malariagen_data.af1.Af1.plot_cnv_hmm_heatmap#

Af1.plot_cnv_hmm_heatmap(region: str | Region | Mapping, sample_sets: Sequence[str] | str | None = None, sample_query: str | None = None, sample_query_options: dict | 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, palette: Sequence[str] | None = ['#cccccc', '#5e3c99', '#b2abd2', '#f7f7f7', '#fdb863', '#e66101'], genes_height: int = 90, show: bool = True, gene_labels: Mapping[str, str] | None = None, gene_labelset: LabelSet | None = None) 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.

sample_query_optionsdict or None, optional

A dictionary of arguments that will be passed through to pandas query() or eval(), e.g. parser, engine, local_dict, global_dict, resolvers.

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).

palettesequence of str or None, optional, default: [‘#cccccc’, ‘#5e3c99’, ‘#b2abd2’, ‘#f7f7f7’, ‘#fdb863’, ‘#e66101’]

List of colors.

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.

gene_labelsMapping[str, str] or None, optional

A mapping of gene identifiers to custom labels, which will appear in the plot.

gene_labelsetLabelSet or None, optional

A LabelSet to use in the plot.

Returns#

Model or None

Bokeh figure.