crested.pl.bar.region_predictions

crested.pl.bar.region_predictions#

crested.pl.bar.region_predictions(adata, region, model_names=None, share_y=True, **kwargs)#

Barplots of all predictions in .layers vs the groundtruth for a specific region across comparing classes.

Parameters:
  • adata (AnnData) – AnnData object containing the predictions in layers.

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

  • model_names (Optional[list[str]] (default: None)) – List of model names in adata.layers. If None, will create a plot per model in adata.layers.

  • share_y (bool (default: True)) – Whether to rescale the y-axis to be the same across plots. Default is True.

  • 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_predictions(
...     adata,
...     region='chr1:3094805-3095305'
...     model_names=["model_1", "model_2"],
...     share_y=False,
...     title="Region chr1:3094805-3095305"
... )
../../../_images/bar_region_predictions.png