function to filter gene list with existing spatial gene sets

filterSpatialGenes(
  gobject,
  spat_unit = NULL,
  feat_type = NULL,
  spatial_genes,
  max = 2500,
  name = c("binSpect", "silhouetteRank", "silhouetteRankTest"),
  method = c("none", "elbow")
)

Arguments

gobject

Giotto object

spat_unit

spatial unit

feat_type

feature type

spatial_genes

input gene list

max

max number of genes selected from spatial test

name

name of spatial gene test for the filtering

method

method of spatial gene selection

Value

list

Details

This function filters given gene list with the gene sets of selected spatial gene test in Giotto, also controls the total size of the gene set with given max number.

Examples

g <- GiottoData::loadGiottoMini("visium")
#> 1. read Giotto object
#> 2. read Giotto feature information
#> 3. read Giotto spatial information
#> 3.1 read Giotto spatial shape information
#> 3.2 read Giotto spatial centroid information
#> 3.3 read Giotto spatial overlap information
#> 4. read Giotto image information
#> python already initialized in this session
#>  active environment : '/usr/bin/python3'
#>  python version : 3.10
#> checking default envname 'giotto_env'
#> a system default python environment was found
#> Using python path:
#>  "/usr/bin/python3"

filterSpatialGenes(g, spatial_genes = "Gm19935")
#> $genes
#> character(0)
#> 
#> $num_genes_removed
#> [1] 1
#>