vampire.anno.pl.logo#
- vampire.anno.pl.logo(adata, feature='information', *, drop_gap=False, colormap=None, conserved_color='#cccccc', title='', figsize=(None, None), save=None, **kwargs)[source]#
Plot the logo plot from anndata object.
- Parameters:
adata (
AnnData) – The AnnData object.feature (
Literal['count','probability','information']) – The feature to show. Default is “information”.drop_gap (
bool) – If True, exclude gap (“-”) from counting and plotting. Only A/C/G/T are shown. Default is False (backward-compatible).colormap (
dict|None) – The colors of the bases. Default is None, using the default colormap.conserved_color (
str|None) – Override color for conserved sites (non-variant positions). Default is “#cccccc”. If set to None, conserved sites will use the general base color instead.title (
str) – The title of the plot. Default is empty.figsize (
tuple[int|None,int|None] |None) – Figure size as (width, height) in pixels. Default is (None, None).save (
str|bool|None) – If True or a str, save the figure. A string is appended to the default filename. Infer the filetype if ending on {‘.pdf’, ‘.png’, ‘.svg’}.**kwargs – Additional keyword arguments passed to Plotly update_layout. Used to control figure-level styling (e.g. template, margin, background color, legend settings).
- Returns:
The logo figure.
- Return type:
Figure
Examples
>>> import vampire as vp >>> vp.anno.pl.set_default_plotstyle() >>> adata = vp.datasets.wdr7_hprc() >>> vp.anno.tl.motif_msa(adata) >>> vp.anno.pl.logo( ... adata, ... feature = "information" ... )