crested.pl.hist.locus_scoring#
- crested.pl.hist.locus_scoring(scores, range, gene_start=None, gene_end=None, title='Predictions across Genomic Regions', ylim=None, bigwig_values=None, bigwig_midpoints=None, filename=None, grid=True, figsize=(30, 5), highlight_positions=None, marker_size=5.0, line_width=2.0)#
Plot the predictions as a line chart over the entire genomic input and optionally indicate the gene locus.
Also plots values from a bigWig file if provided.
- Parameters:
scores – An array of prediction scores for each window.
range – The genomic range of the input.
model_class – The class index to plot from the prediction scores.
gene_start (default:
None
) – The start position of the gene locus to highlight on the plot.gene_end (default:
None
) – The end position of the gene locus to highlight on the plot.title (default:
'Predictions across Genomic Regions'
) – The title of the plot.ylim (default:
None
) – Manually set the y-range of the plot.bigwig_values (default:
None
) – A numpy array of values extracted from a bigWig file for the same coordinates.bigwig_midpoints (default:
None
) – A list of base pair positions corresponding to the bigwig_values.filename (default:
None
) – The filename to save the plot to.grid (default:
True
) – Add grid to plot.figsize (default:
(30, 5)
) – Size of figure.highlight_positions (default:
None
) – A list of tuples specifying ranges to highlight on the plot.marker_size (default:
5.0
) – Size of the markers in the plot. Default is 5.0.line_width (default:
2.0
) – Width of the lines in the plot. Default is 2.0.
Example
>>> crested.pl.hist.locus_scoring( ... scores, ... range=(0, 1000), ... gene_start=100, ... gene_end=200, ... title="Predictions across Genomic Regions", ... bigwig_values=bigwig_values, ... bigwig_midpoints=bigwig_midpoints, ... )