scirpy.pl.alpha_diversity#
- scirpy.pl.alpha_diversity(adata, groupby, *, target_col='clone_id', metric='normalized_shannon_entropy', metric_kwargs=None, vistype='bar', airr_mod='airr', **kwargs)#
Plot the alpha diversity per group.
`Plot the alpha diversity per group.
Will execute
scirpy.tl.alpha_diversity()
on-the-fly.- Parameters:
adata (
Union
[AnnData
,MuData
,DataHandler
]) – AnnData or MuData object that contains AIRR information.groupby (
str
) – Column ofobs
by which the grouping will be performedtarget_col (
str
(default:'clone_id'
)) – Column on which to compute the alpha diversitymetric (
Union
[str
,Callable
[[ndarray
],Union
[int
,float
]]] (default:'normalized_shannon_entropy'
)) – A metric used for diversity estimation out ofnormalized_shannon_entropy
,D50
,DXX
, any of scikit-bio’s alpha diversity metrics, or a custom function. For more details, seescirpy.tl.alpha_diversity()
.metric_kwargs (
Optional
[Mapping
] (default:None
)) – Dictionary of additional parameters passed to the metric function.vistype (
Literal
['bar'
] (default:'bar'
)) – Visualization type. Currently only ‘bar’ is supported.airr_mod (
str
(default:'airr'
)) – Name of the modality with AIRR information is stored in theMuData
object. if anAnnData
object is passed to the function, this parameter is ignored.**kwargs – Additional parameters passed to
scirpy.pl.base.bar()
- Return type: