correlateExpression: Correlate expression

Description Usage Arguments Author(s) Examples

View source: R/expression_correlation.R

Description

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.

Usage

1
correlateExpression(s1, s2, genes, from_sp, to_sp, return_input = FALSE)

Arguments

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 s1.

from_sp

Species of s1

to_sp

Species of s2. If different from from_sp, conversion of gene names will be handled automatically.

method

Character, one of "pearson", "kendall", "spearman", specifying the method to use for the correlations. Default: "spearman"

Author(s)

Selin Jessa

Examples

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")

fungenomics/cytobox documentation built on Feb. 13, 2020, 10:51 a.m.