malariagen_data.ag3.Ag3.plot_cnv_hmm_heatmap#
- Ag3.plot_cnv_hmm_heatmap(region: str | Region | Mapping, sample_sets: Sequence[str] | str | None = None, sample_query: str | None = None, max_coverage_variance: float | None = 0.2, sizing_mode: Literal['fixed', 'stretch_width', 'stretch_height', 'stretch_both', 'scale_width', 'scale_height', 'scale_both'] = 'stretch_width', width: int | None = None, row_height: int = 7, track_height: int | None = None, genes_height: int = 90, show: bool = True) Model | None #
Plot CNV HMM data for multiple samples as a heatmap, with a genes track, using bokeh.
Parameters#
- regionstr or Region or Mapping
Region of the reference genome. Can be a contig name, region string (formatted like “{contig}:{start}-{end}”), or identifier of a genome feature such as a gene or transcript.
- sample_setssequence of str or str or None, optional
List of sample sets and/or releases. Can also be a single sample set or release.
- sample_querystr or None, optional
A pandas query string to be evaluated against the sample metadata, to select samples to be included in the returned data.
- max_coverage_variancefloat or None, optional, default: 0.2
Remove samples if coverage variance exceeds this value.
- sizing_mode{‘fixed’, ‘stretch_width’, ‘stretch_height’, ‘stretch_both’, ‘scale_width’, ‘scale_height’, ‘scale_both’}, optional, default: ‘stretch_width’
Bokeh plot sizing mode, see also https://docs.bokeh.org/en/latest/docs /user_guide/basic/layouts.html#sizing-modes.
- widthint or None, optional
Plot width in pixels (px).
- row_heightint, optional, default: 7
Plot height per row (sample) in pixels (px).
- track_heightint or None, optional
Main track height in pixels (px).
- genes_heightint, optional, default: 90
Genes track height in pixels (px).
- showbool, optional, default: True
If true, show the plot. If False, do not show the plot, but return the figure.
Returns#
- Model or None
Bokeh figure.