multiPCA {GeneNMF} | R Documentation |
Run PCA on a list of Seurat objects
Description
Given a list of Seurat objects, run non-negative PCA factorization on each sample individually.
Usage
multiPCA(
obj.list,
assay = "RNA",
slot = "data",
k = 4:5,
hvg = NULL,
nfeatures = 500,
min.exp = 0.01,
max.exp = 3,
min.cells.per.sample = 10,
center = FALSE,
scale = FALSE,
hvg.blocklist = NULL,
seed = 123
)
Arguments
obj.list |
A list of Seurat objects |
assay |
Get data matrix from this assay |
slot |
Get data matrix from this slot (=layer) |
k |
Number of target components for PCA |
hvg |
List of pre-calculated variable genes to subset the matrix. If hvg=NULL it calculates them automatically |
nfeatures |
Number of HVG, if calculate_hvg=TRUE |
min.exp |
Minimum average log-expression value for retaining genes |
max.exp |
Maximum average log-expression value for retaining genes |
min.cells.per.sample |
Minimum numer of cells per sample (smaller samples will be ignored) |
center |
Whether to center the data matrix |
scale |
Whether to scale the data matrix |
hvg.blocklist |
Optionally takes a vector or list of vectors of gene names. These genes will be ignored for HVG detection. This is useful to mitigateeffect of genes associated with technical artifacts and batch effects (e.g. mitochondrial), and to exclude TCR and BCR adaptive immune(clone-specific) receptors. If set to 'NULL' no genes will be excluded |
seed |
Random seed |
Value
Returns a list of non-negative PCA programs, one for each sample.
The format of each program in the list follows the
structure of nmf
factorization models.
Examples
library(Seurat)
data(sampleObj)
geneNMF_programs <- multiPCA(list(sampleObj), k=5)