crested.pl.bar.region

Contents

crested.pl.bar.region#

crested.pl.bar.region(adata, region, target='groundtruth', **kwargs)#

Barplot of groundtruths or predictions for a specific region comparing classes.

Parameters:
  • adata (AnnData) – AnnData object containing the genomic data in var.

  • region (str) – String in the format ‘chr:start-end’ representing the genomic location.

  • target (str (default: 'groundtruth')) – The target to plot the distribution for, either “groundtruth” or the name of a prediction layer in adata.layers.

  • kwargs – Additional arguments passed to render_plot() to control the final plot output. Please see render_plot() for details.

Return type:

Figure

Example

>>> crested.pl.bar.region(
...     adata,
...     region="chr1:3094805-3095305",
...     target="groundtruth",
...     xlabel="Cell Type",
...     ylabel="Peak height",
...     figsize=(20, 3),
...     figtitle="chr1:3094805-3095305",
... )
../../../_images/bar_region.png