scanpy.pl.pca_loadings
- scanpy.pl.pca_loadings(adata, components=None, include_lowest=True, show=None, save=None)
Rank genes according to contributions to PCs.
- Parameters
- adata :
AnnDataAnnData Annotated data matrix.
- components :
str|Sequence[int] |NoneUnion[str,Sequence[int],None] (default:None) For example,
'1,2,3'means[1, 2, 3], first, second, third principal component.- include_lowest :
boolbool(default:True) Show the genes with both highest and lowest loadings.
- show :
bool|NoneOptional[bool] (default:None) Show the plot, do not return axis.
- save :
str|bool|NoneUnion[str,bool,None] (default:None) If
Trueor astr, save the figure. A string is appended to the default filename. Infer the filetype if ending on {'.pdf','.png','.svg'}.
- adata :
Examples
import scanpy as sc adata = sc.datasets.pbmc3k_processed()
Show first 3 components loadings
sc.pl.pca_loadings(adata, components = '1,2,3')