STgradient | R Documentation |
Calculates Spearman's coefficients to detect genes showing expression spatial gradients
STgradient(
x = NULL,
samples = NULL,
topgenes = 2000,
annot = NULL,
ref = NULL,
exclude = NULL,
out_rm = F,
limit = NULL,
distsumm = "min",
min_nb = 3,
robust = T,
nb_dist_thr = NULL,
log_dist = F,
cores = NULL
)
x |
an STlist with transformed gene expression |
samples |
the samples on which the test should be executed |
topgenes |
the number of high-variance genes to be tested. These genes are selected in descending order of variance as caclulated using Seurat's vst method |
annot |
the name of a column in |
ref |
one of the tissue domains in the column specified in |
exclude |
optional, a cluster/domain to exclude from the analysis |
out_rm |
logical (optional), remove gene expression outliers defined by
the interquartile method. This option is only valid when |
limit |
limite the analysis to spots/cells with distances to |
distsumm |
the distance summary metric to use in correlations. One of |
min_nb |
the minimum number of immediate neighbors a spot or cell has to
have in order to be included in the analysis. This parameter seeks to reduce the
effect of isolated |
robust |
logical, whether to use robust regression ( |
nb_dist_thr |
a numeric vector of length two indicating the tolerance interval to assign
spots/cells to neighborhoods. The wider the range of the interval, the more likely
distinct neighbors to be considered. If NULL, |
log_dist |
logical, whether to apply the natural logarithm to the spot/cell distances. It applies to all distances a constant (1e-200) to avoid log(0) |
cores |
the number of cores used during parallelization. If NULL (default), the number of cores is defined automatically |
The STgradient
function fits linear models and calculates Spearman coefficients
between the expression of a gene and the minimum or average distance of spots or
cells to a reference tissue domain. In other wordsm the STgradient
function
can be used to investigate if a gene is expressed higher in spots/cells closer to
a specific reference tissue domain, compared to spots/cells farther from the
reference domain (or viceversa as indicated by the Spearman's cofficient).
a list of data frames with the results of the test
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.