
PCA on MetaCells (sparse data)
rs_mc_pca.Rd
Calculates PCA for MetaCells or more generally speaking sparse
data. This is happening in-memory compared to the (usually much) larger
single cell data sets. The matrix is densified, optionally CLR transformed
and scaled according to
pca_params before the SVD.
Arguments
- sparse_data
A named list that needs to have
data,indptr,indices,nrow,ncolandcs_type. Shape is (metacells, genes), holding the normalised counts of the genes to use.- no_pcs
Integer. Number of PCs to return.
- pca_params
Named list. Contains the parameters to use for this PCA run, see
params_sc_pca().- clr_offsets
Optional numeric. One offset per meta cell for the
PFlogPFnormalisation from Booeshaghi, et al., computed against the full gene panel. Required ifpca_params$clrisTRUE, ignored otherwise.- seed
Integer. Random seed for the randomised SVD.
- verbose
Integer.
0L- quiet;1L- normal verbosity;2L- detailed verbosity.