Description Usage Arguments Author(s) Examples
View source: R/expression_correlation.R
Compute a correlation matrix of gene expression. For matrices, this function will
correlate the columns; for Seurat objects, this function automatically retrieves
the cluster means of the provided genes using meanClusterExpression
,
and then correlates the cluster means.
1 | correlateExpression(s1, s2, genes, from_sp, to_sp, return_input = FALSE)
|
s1 |
A Seurat object, or a gene x cluster/sample matrix giving mean cluster/sample expression for dataset 1. If a matrix, rownames should be gene symbols. This dataset will form the x-axis of the plot; column names will be pulled from the column names of this object. |
s2 |
A Seurat object, or a gene x cluster/sample matrix giving mean cluster/sample expression for dataset 2. This dataset will form the y-axis of the plot; row names will be pulled from the column names of this object. |
genes |
Character vector of genes, in the same species as |
from_sp |
Species of |
to_sp |
Species of |
method |
Character, one of "pearson", "kendall", "spearman", specifying the method to use for the correlations. Default: "spearman" |
Selin Jessa
1 2 3 4 5 6 7 8 | # Compute pairwise correlations between clusters in pbmc
# NOT RUN
# correlateExpression(s1 = pbmc,
# s2 = pbmc,
# genes = head(rownames(pbmc@raw.data), 100),
# from_sp = "hg",
# to_sp = "hg")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.