pca

Computes PCA coordinates, loadings and variance decomposition. Uses the implementation of scikit-learn [Pedregosa11]_. This may be useful in the preprocessing stage, for example looking at batch effect or effect of doublets when forming clusters.

Parameters

color: str PCA color. If the observation is categorical, this will group clusters into discreet colours. If observation is continuous, this will colour data on a scale represented by the colour bar.


Web view

pca_screenshot

Python equivalent

import scanpy as sc

sc.pp.pca(adata, random_state=42)
sc.pl.pca(adata, color="batch")