scSemiProfiler_dev.utils.composition_by_group¶
-
scSemiProfiler_dev.utils.composition_by_group(adata, colormap=None, groupby=None, save=False, title='Cell type composition')[source]¶ Visualizing the cell type composition in each group.
- Parameters
adata (
anndata._core.anndata.AnnData) – The dataset to investigatecolormap (
typing.Union[str,list,None]) – The colormap for visualizationgroupby (
typing.Optional[str]) – The key in .obs specifying groups.save (
bool) – Whether to save the plot or nottitle (
str) – Plot title
Example
>>> groupby = 'states_collection_sum' >>> composition_by_group( >>> adata = gtdata, >>> groupby = groupby, >>> title = 'Ground truth' >>> )
- Return type