runSpatialCorrelationAnalysis | R Documentation |
This function screens a subset of genes and evaluates their
spatial overlap by correlation- and subsequent clustering analysis. Results can be
conveniently obtained or processed with additional functions such as
clusterSpCorResults()
, getGenes()
or getSpCorResults()
.
runSpatialCorrelationAnalysis(
object,
of_sample = "",
genes = 2000,
genes_additional = NULL,
threshold_stw = 0.5,
threshold_stpv = 0.1,
with_ties = TRUE,
method_cor = "pearson",
method_dist = "euclidean",
mtr_name = NULL,
verbose = TRUE
)
object |
A valid spata-object. |
of_sample |
This argument is currently inactive. It might be reactivated when spata-objects can store more than one sample. |
genes |
A numeric value (integer) or a character vector. Determines which genes are included in the correlation assessment. If specified as a numeric value the genes are sorted in a decreasing fashion corresponding to their variance across all barcode spots. Then the top n genes are included whereby n is equal to the specified numeric value. If specified as a character vector it's elements are considered to be gene names and all valid inputs are included. |
genes_additional |
Character vector of gene names. If |
threshold_stw , threshold_stpv |
Numeric values. Both values refer to the
results of the shapiro-wilkinson test results for each gene. Before beeing sorted
according to their variance you can use both arguments to filter for genes
with a W-value bigger or equal to |
with_ties |
Logical. If set to TRUE (the default) genes with equal variances are kept even if the total number of genes |
method_dist |
Character value or vector (see details for more). Denotes the distance methods (e.g. 'euclidean') to be used. Run |
The overall expression matrix is filtered according to the input
of argument genes
, transposed and given to stats::cor()
. The returned
correlation matrix is given to stats::dist()
to calculate the distance
matrix needed for subsequent cluster analysis.
Use getGenes()
and it's argument similar_to
in order to get genes
that feature a similar expression profile/pattern as a gene of interest.
An updated spata-object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.