spatialTrajectoryScreening | R Documentation |
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,
...
)
object |
An object of class |
variables |
Character vector. All numeric variables to be included in the screening process. |
resolution |
Distance measure. The resolution
with which the expression gradient is inferred. Defaults are platform specific.
See more in detail section of |
width |
Distance measure. The width of the trajectory frame. Defaults to the trajectory length. |
unit |
Character value. Specifies the desired unit in
which distance measures
or area measures are provided.
Run |
sign_var |
Either p_value or fdr. Defaults to fdr. |
sign_threshold |
The significance threshold. Defaults to 0.05. |
n_random |
Number of random permutations for the significance testing of step 2. |
seed |
Numeric value. Sets the random seed. |
control |
A list of arguments as taken from |
verbose |
Logical. If (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.
createSpatialTrajectories()
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
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.