Given a list of Seurat objects, run non-negative PCA factorization on each sample individually.
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
)
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.
A list of Seurat objects
Get data matrix from this assay
Get data matrix from this slot (=layer)
Number of target components for PCA
List of pre-calculated variable genes to subset the matrix. If hvg=NULL it calculates them automatically
Number of HVG, if calculate_hvg=TRUE
Minimum average log-expression value for retaining genes
Maximum average log-expression value for retaining genes
Minimum numer of cells per sample (smaller samples will be ignored)
Whether to center the data matrix
Whether to scale the data matrix
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
Random seed
library(Seurat)
data(sampleObj)
geneNMF_programs <- multiPCA(list(sampleObj), k=5)
Run the code above in your browser using DataLab