Skip to content

Commit

Permalink
Added the option for a palette (#688)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbrenas authored Dec 6, 2024
1 parent ac45181 commit 70ad53d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion malariagen_data/anoph/cnv_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,7 @@ def plot_cnv_hmm_heatmap_track(
width: gplt_params.width = gplt_params.width_default,
row_height: gplt_params.row_height = 7,
height: Optional[gplt_params.height] = None,
palette: Optional[gplt_params.colors] = cnv_params.colorscale_default,
show: gplt_params.show = True,
output_backend: gplt_params.output_backend = gplt_params.output_backend_default,
) -> gplt_params.optional_figure:
Expand Down Expand Up @@ -929,7 +930,6 @@ def plot_cnv_hmm_heatmap_track(
)

debug("set up palette and color mapping")
palette = cnv_params.colorscale_default
color_mapper = bkmod.LinearColorMapper(low=-1.5, high=4.5, palette=palette)

debug("plot the HMM copy number data as an image")
Expand Down Expand Up @@ -999,6 +999,7 @@ def plot_cnv_hmm_heatmap(
width: gplt_params.width = gplt_params.width_default,
row_height: gplt_params.row_height = 7,
track_height: Optional[gplt_params.track_height] = None,
palette: Optional[gplt_params.colors] = cnv_params.colorscale_default,
genes_height: gplt_params.genes_height = gplt_params.genes_height_default,
show: gplt_params.show = True,
gene_labels: Optional[gplt_params.gene_labels] = None,
Expand All @@ -1020,6 +1021,7 @@ def plot_cnv_hmm_heatmap(
width=width,
row_height=row_height,
height=track_height,
palette=palette,
show=False,
)
fig1.xaxis.visible = False
Expand Down

0 comments on commit 70ad53d

Please sign in to comment.