Skip to content

Commit a44cfd2

Browse files
committed
fix: rename loop variable to avoid shadowing contig parameter
In plot_h12_gwss_multi_overlay_track(), the for-loop unpacking reused the name 'contig' for the array of contig indices returned by h12_gwss(). This overwrote the function parameter (a string like '2L'), causing _bokeh_style_genome_xaxis() to receive a NumPy array and render a corrupted x-axis label. Rename the loop variable to contig_idx to preserve the original parameter value. Fixes #993
1 parent 5b82f0b commit a44cfd2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

malariagen_data/anoph/h12.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ def plot_h12_gwss_multi_overlay_track(
625625
)
626626

627627
# Plot H12.
628-
for i, (cohort_label, (x, h12, contig)) in enumerate(res.items()):
628+
for i, (cohort_label, (x, h12, contig_idx)) in enumerate(res.items()):
629629
fig.scatter(
630630
x=x,
631631
y=h12,

0 commit comments

Comments
 (0)