In single-cell RNA sequencing analysis, I am wondering how many percents explained variance by the first 50 principal components of PCA analysis is suitable for downstream KNN
and umap
?
If there are lots of samples (>40) and cells (>100,000) to analyze together, there are a lot of highly_variable_genes
(>4000) can be found
import scanpy as sc
sc.pp.highly_variable_genes(adata, flavor='cell_ranger', n_top_genes=None)
The explained variance by the first 50 principal components of PCA analysis sc.pp.pca(adata, n_comps=50, use_highly_variable=True, svd_solver='arpack')
is very low (<12%), increase the number of principal components does not help a lot.
I assume that the low explained variance of PCs will make KNN
and umap
difficult to separate the cells well. Am I correct?
sc.pp.neighbors(adata, n_neighbors=15)
sc.tl.umap(adata, min_dist=0.3, spread=2.0)
I can reduce the number of highly_variable_genes
to get more explained variance by the first 50 principal components, but KNN
and umap
still can not separate the cells well.
I checked the first 5 PCs when I reduce the number of highly_variable_genes, and it doesn't look very high:
>>> np.cumsum(adata.uns['pca']['variance_ratio'])
array([0.08419679, 0.12635055, 0.13610176, 0.14490107, 0.15326007])
Any suggestions would be greatly appreciated.