Runs a canonical correlation analysis using a diagonal implementation of CCA.
For details about stored CCA calculation parameters, see
PrintCCAParams
.
RunCCA(object, object2, group1, group2, group.by, num.cc = 20, genes.use,
scale.data = TRUE, rescale.groups = FALSE)
Seurat object
Optional second object. If object2 is passed, object1 will be considered as group1 and object2 as group2.
First set of cells (or IDs) for CCA
Second set of cells (or IDs) for CCA
Factor to group by (column vector stored in object@meta.data)
Number of canonical vectors to calculate
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.
Use the scaled data from the object
Rescale each set of cells independently
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.