mowgli.pl¶
- mowgli.pl.clustermap(mdata: MuData, obsm: str = 'W_OT', cmap='viridis', **kwds)¶
Wrapper around Scanpy’s clustermap.
- Parameters:
mdata (md.MuData) – The input data
obsm (str, optional) – The obsm field to consider. Defaults to ‘W_OT’.
cmap (str, optional) – The colormap. Defaults to ‘viridis’.
- mowgli.pl.enrich(enr: DataFrame, query_name: str, n_terms: int = 10)¶
Display a list of enriched terms.
- Parameters:
enr (pd.DataFrame) – The enrichment object returned by mowgli.tl.enrich()
query_name (str) – The name of the query, e.g. “dimension 0”.
- mowgli.pl.factor_violin(mdata: MuData, groupby: str, obsm: str = 'W_OT', dim: int = 0, **kwds)¶
Make a violin plot of cells for a given latent dimension.
- Parameters:
mdata (md.MuData) – The input data
dim (int, optional) – The latent dimension. Defaults to 0.
obsm (str, optional) – The embedding. Defaults to ‘W_OT’.
groupby (str, optional) – Observation groups.
- mowgli.pl.heatmap(mdata: MuData, groupby: str, obsm: str = 'W_OT', cmap: str = 'viridis', sort_var: bool = False, save: str = None, **kwds) None¶
Produce a heatmap of an embedding
- Parameters:
mdata (md.MuData) – Input data
groupby (str) – What to group by
obsm (str) – The embedding. Defaults to ‘W_OT’.
cmap (str, optional) – Color map. Defaults to ‘viridis’.
sort_var (bool, optional) – Sort dimensions by variance. Defaults to False.
- mowgli.pl.top_features(mdata: MuData, mod: str = 'rna', uns: str = 'H_OT', dim: int = 0, n_top: int = 10, ax: axes = None, palette: str = 'Blues_r')¶
Display the top features for a given dimension.
- Parameters:
mdata (md.MuData) – The input mdata object
mod (str, optional) – The modality to consider. Defaults to ‘rna’.
uns (str, optional) – The uns field to consider. Defaults to ‘H_OT’.
dim (int, optional) – The latent dimension. Defaults to 0.
n_top (int, optional) – The number of top features to display. Defaults to 10.
ax (plt.axes, optional) – The axes to use. Defaults to None.
palette (str, optional) – The color palette to use. Defaults to ‘Blues_r’.
- Returns:
The axes used.
- Return type:
plt.axes
- mowgli.pl.umap(mdata: MuData, dim: int | list = 0, rescale: bool = False, obsm: str = 'W_OT', neighbours_key=None, **kwds)¶
Wrapper around Scanpy’s sc.pl.umap. Computes UMAP for a given latent dimension and plots it. :param mdata: The input data :type mdata: md.MuData :param dim: The latent dimension. Defaults to 0. :type dim: int | list, optional :param rescale: If True, Rescale the color palette across all plots to the maximum value in the weight matrix. Defaults to False. :type rescale: bool, optional :param obsm: The embedding. Defaults to ‘W_OT’. :type obsm: str, optional :param neighbours_key: The key for the neighbours in mdata.uns to use to compute neighbors. Defaults to None. :type neighbours_key: str, optional