Learn R Programming

Seurat (version 2.0.0)

RunCCA: Perform Canonical Correlation Analysis

Description

Runs a canonical correlation analysis using a diagonal implementation of CCA. For details about stored CCA calculation parameters, see PrintCCAParams.

Usage

RunCCA(object, object2, group1, group2, group.by, num.cc = 20, genes.use,
  scale.data = TRUE, rescale.groups = FALSE)

Arguments

object

Seurat object

object2

Optional second object. If object2 is passed, object1 will be considered as group1 and object2 as group2.

group1

First set of cells (or IDs) for CCA

group2

Second set of cells (or IDs) for CCA

group.by

Factor to group by (column vector stored in object@meta.data)

num.cc

Number of canonical vectors to calculate

genes.use

Set of genes to use in CCA. Default is object@var.genes. If two objects are given, the default is the union of both variable gene sets that are also present in both objects.

scale.data

Use the scaled data from the object

rescale.groups

Rescale each set of cells independently

Value

Returns Seurat object with the CCA stored in the @dr$cca slot. If one object is passed, the same object is returned. If two are passed, a combined object is returned.