runSparkx: Identify spatially significant features with SPARKX

getSparkxGeneDfR Documentation

Identify spatially significant features with SPARKX

Description

A wrapper around the algorithm introduced by Zhu et al. 2021 to identify features with non-random spatial expression pattern with SPARK-X.

Usage

getSparkxGeneDf(object, threshold_pval = 1, arrange_pval = TRUE)

getSparkxGenes(object, threshold_pval)

getSparkxResults(object, assay_name = activeAssay(object), error = TRUE, ...)

runSPARKX(
  object,
  assay_name = activeAssay(object),
  numCores = 1,
  option = "mixture",
  verbose = NULL
)

Arguments

object

An object of class SPATA2 or, in case of S4 generics, objects of classes for which a method has been defined.

assay_name

Only relevant if the SPATA2 object contains more than one assay: Denotes the assay of interest and thus the molecular modality to use. Defaults to the active assay as set by activateAssay().

error

Logical. If TRUE and the input is invalid the function throws an error.

...

Used to absorb deprecated arguments or functions.

verbose

Logical. If TRUE, informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)

Value

The updated input object, containing the added, removed or computed results.

Author(s)

Zhu, J., Sun, S. & Zhou, X. SPARK-X: non-parametric modeling enables scalable and robust detection of spatial expression patterns for large spatial transcriptomic studies. Genome Biol 22, 184 (2021). https://doi.org/10.1186/s13059-021-02404-0

Examples

library(SPATA2)

data("example_data")

object <- example_data$object_UKF313T_diet

object <- runSPARKX(object)

sparkx_genes <- getSparkxGenes(object, threshold = 0.05)

sparkx_df <- getSparkxGenesDf(object)



theMILOlab/SPATA2 documentation built on Feb. 8, 2025, 11:41 p.m.