Compute spatially expressed genes with SPARK method
spark(
gobject,
spat_loc_name = "raw",
feat_type = NULL,
spat_unit = NULL,
percentage = 0.1,
min_count = 10,
expression_values = "raw",
num_core = 5,
covariates = NULL,
return_object = c("data.table", "spark"),
...
)
giotto object
name for spatial locations
feature type
spatial unit
The percentage of cells that are expressed for analysis
minimum number of counts for a gene to be included
type of values to use (raw by default)
number of cores to use
The covariates in experiments, i.e. confounding factors/batch effect. Column name of giotto cell metadata.
type of result to return (data.table or spark object)
Additional parameters to the spark.vc
function
data.table with SPARK spatial genes results or the SPARK object
This function is a wrapper for the method implemented in the SPARK package: SPARK package:
CreateSPARKObject create a SPARK object from a giotto object
spark.vc Fits the count-based spatial model to estimate the
parameters, see spark.vc
for additional parameters
spark.test Testing multiple kernel matrices
Publication: doi:10.1101/810903
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"
spark(g)
#> Error: package 'SPARK' is not yet installed
#>
#> To install:
#> devtools::install_github("xzhoulab/SPARK")