Identify marker feats for selected clusters based on the MAST package.

findMastMarkers(
  gobject,
  feat_type = NULL,
  spat_unit = NULL,
  expression_values = c("normalized", "scaled", "custom"),
  cluster_column,
  group_1 = NULL,
  group_1_name = NULL,
  group_2 = NULL,
  group_2_name = NULL,
  adjust_columns = NULL,
  verbose = FALSE,
  ...
)

Arguments

gobject

giotto object

feat_type

feature type

spat_unit

spatial unit

expression_values

feat expression values to use

cluster_column

clusters to use

group_1

group 1 cluster IDs from cluster_column for pairwise comparison

group_1_name

custom name for group_1 clusters

group_2

group 2 cluster IDs from cluster_column for pairwise comparison

group_2_name

custom name for group_2 clusters

adjust_columns

column in pDataDT to adjust for (e.g. detection rate)

verbose

be verbose

...

additional parameters for the zlm function in MAST

Value

data.table with marker feats

Details

This is a minimal convenience wrapper around the zlm from the MAST package to detect differentially expressed feats. Caution: with large datasets MAST might take a long time to run and finish

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"

findMastMarkers(
    gobject = g, cluster_column = "leiden_clus", group_1 = 1,
    group_2 = 2
)
#> Error: package 'MAST' is not yet installed
#> 
#>  To install:
#> if(!requireNamespace('BiocManager', quietly = TRUE)) install.packages('BiocManager');
#> BiocManager::install(c("MAST"))