ehrapy.plot.ranking¶
- ehrapy.plot.ranking(adata, attr, keys, dictionary=None, indices=None, labels=None, color='black', n_points=30, log=False, include_lowest=False, show=None)[source]¶
Plot rankings.
See, for example, how this is used in pl.pca_loadings.
- Parameters:
adata (
AnnData
) –AnnData
object object containing all observations.attr (
Literal
['var'
,'obs'
,'uns'
,'varm'
,'obsm'
]) – The attribute of AnnData that contains the score.keys (
str
|Sequence
[str
]) – The scores to look up an array from the attribute of adata.dictionary (default:
None
) – Optional key dictionary.indices (default:
None
) – Optional dictionary indices.labels (default:
None
) – Optional labels.color (default:
'black'
) – Optional primary color (default: black).n_points (default:
30
) – Number of points (default: 30).log (default:
False
) – Whether logarithmic scale should be used.include_lowest (default:
False
) – Whether to include the lowest points.show (default:
None
) – Whether to show the plot.
- Returns:
Returns matplotlib gridspec with access to the axes.
Example
import ehrapy as ep adata = ep.dt.mimic_2(encoded=True) ep.pp.knn_impute(adata) ep.pp.log_norm(adata, offset=1) ep.pp.neighbors(adata) ep.pp.pca(adata) TODO: ep.pl.ranking(adata)