View source: R/correlation_matrix.R
correlation_heatmap | R Documentation |
This function returns a correlation heatmap matrix between the features of interest specified including genes and or metadata features.
correlation_heatmap( se, genes = NULL, feats = NULL, assay = "Spatial", slot = "data", cor_method = "pearson", ... )
se |
Spatial Seurat object we want to assess. |
genes |
vector with genes that we want to build the correlation heatmap with. |
feats |
vector with metadata features that we want to build the correlation heatmap with. |
assay |
assay from where we want to extract the gene expression. |
slot |
slot from where we want to extract the gene expression. |
cor_method |
Method to use for correlation: c("pearson", "kendall", "spearman"). By default pearson. |
... |
Further arguments to pass to ggcorrplot::ggcorrplot |
Correlation matrix heatmap
## Not run: library(Seurat) library(SeuratData) sp_obj <- SeuratData::LoadData(ds = "stxBrain", type = "posterior1") correlation_heatmap( se = sp_obj, slot = "counts", assay = "Spatial", genes = c("Ms4a1", "Cd79a", "Cd3d", "Cd3e", "Cd8a"), feats = NULL, cor_method = "pearson", title = "Gene-Gene correlation heatmap") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.