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 :
AnnData
AnnData
Annotated data matrix.
- components :
str
|Sequence
[int
] |None
Union
[str
,Sequence
[int
],None
] (default:None
) For example,
'1,2,3'
means[1, 2, 3]
, first, second, third principal component.- include_lowest :
bool
bool
(default:True
) Show the genes with both highest and lowest loadings.
- show :
bool
|None
Optional
[bool
] (default:None
) Show the plot, do not return axis.
- save :
str
|bool
|None
Union
[str
,bool
,None
] (default:None
) If
True
or 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')