forked from satijalab/seurat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRunCCA.Rd
74 lines (59 loc) · 2.36 KB
/
RunCCA.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generics.R, R/dimensional_reduction.R
\name{RunCCA}
\alias{RunCCA}
\alias{RunCCA.default}
\alias{RunCCA.Seurat}
\title{Perform Canonical Correlation Analysis}
\usage{
RunCCA(object1, object2, ...)
\method{RunCCA}{default}(object1, object2, standardize = TRUE,
num.cc = 20, verbose = FALSE, use.cpp = TRUE, ...)
\method{RunCCA}{Seurat}(object1, object2, assay1 = NULL, assay2 = NULL,
num.cc = 20, features = NULL, renormalize = FALSE,
rescale = FALSE, compute.gene.loadings = TRUE, add.cell.id1 = NULL,
add.cell.id2 = NULL, verbose = TRUE, use.cpp = TRUE, ...)
}
\arguments{
\item{object1}{First Seurat object}
\item{object2}{Second Seurat object.}
\item{...}{Extra parameters (passed onto MergeSeurat in case with two objects
passed, passed onto ScaleData in case with single object and rescale.groups
set to TRUE)}
\item{standardize}{Standardize matrices - scales columns to have unit variance
and mean 0}
\item{num.cc}{Number of canonical vectors to calculate}
\item{verbose}{...}
\item{use.cpp}{...}
\item{assay1, assay2}{Assays to pull from in the first and second objects, respectively}
\item{features}{Set of genes to use in CCA. Default is the union of both
the variable features sets present in both objects.}
\item{renormalize}{Renormalize raw data after merging the objects. If FALSE,
merge the data matrices also.}
\item{rescale}{Rescale the datasets prior to CCA. If FALSE, uses existing data in the scale data slots.}
\item{compute.gene.loadings}{Also compute the gene loadings. NOTE - this will
scale every gene in the dataset which may impose a high memory cost.}
\item{add.cell.id1, add.cell.id2}{Add ...}
}
\value{
Returns a combined Seurat object with the CCA results stored.
}
\description{
Runs a canonical correlation analysis using a diagonal implementation of CCA.
For details about stored CCA calculation parameters, see
\code{PrintCCAParams}.
}
\examples{
pbmc_small
# As CCA requires two datasets, we will split our test object into two just for this example
pbmc1 <- subset(pbmc_small, cells = colnames(pbmc_small)[1:40])
pbmc2 <- subset(pbmc_small, cells = colnames(x = pbmc_small)[41:80])
pbmc1[["group"]] <- "group1"
pbmc2[["group"]] <- "group2"
pbmc_cca <- RunCCA(object1 = pbmc1, object2 = pbmc2)
# Print results
print(x = pbmc_cca[["cca"]])
}
\seealso{
\code{\link{merge.Seurat}}
}