spatialTrajectoryScreening.Rd
Screens the sample for numeric variables that follow specific expression changes along the course of the spatial trajectory.
spatialTrajectoryScreening(
object,
id,
variables,
resolution = recSgsRes(object),
width = getTrajectoryLength(object, id),
unit = getDefaultUnit(object),
bcs_exclude = character(0),
sign_var = "fdr",
sign_threshold = 0.05,
force_comp = FALSE,
model_add = NULL,
model_subset = NULL,
model_remove = NULL,
estimate_R2 = TRUE,
rm_zero_infl = TRUE,
n_random = 10000,
seed = 123,
control = NULL,
verbose = NULL,
...
)
An object of class SPATA2
or, in case of S4 generics,
objects of classes for which a method has been defined.
Character vector. All numeric variables to be included in the screening process.
Distance measure. The resolution
with which the expression gradient is inferred. Defaults are platform specific.
See more in detail section of recSgsRes()
.
Distance measure. The width of the trajectory frame. Defaults to the trajectory length.
Character value. Specifies the desired unit in
which distance measures
or area measures are provided.
Run validUnitsOfLength()
or validUnitsOfArea()
for valid
input options.
Either p_value or fdr. Defaults to fdr.
The significance threshold. Defaults to 0.05.
Number of random permutations for the significance testing of step 2.
Numeric value. Sets the random seed.
A list of arguments as taken from stats::loess.control()
.
Default setting is stored in SPATA2::sgs_loess_control
.
Logical. If TRUE
, informative messages regarding
the computational progress will be printed.
(Warning messages will always be printed.)
Used to absorb deprecated arguments or functions.
An object of class SpatialTrajectoryScreening
. See documentation
with ?ImageAnnotationScreening
for more information.
library(SPATA2)
object <- example_data$object_UKF269T_diet
object <- identifyTissueOutline(object)
object <- runSPARKX(object)
genes <- getSparkxGenes(object, threshold_pval = 0.05)
id <- "horizontal_mid"
plotImage(object) +
ggpLayerSpatialTrajectories(object, ids = id)
plotSpatialTrajectories(object, ids = id)
sts_out <-
spatialTrajectoryScreening(
object = object,
id = id,
variables = genes
)