Skip to content

fix(plots): stop axis labels repeating or collapsing to 0 - #212

Merged
ewels merged 1 commit into
seqeralabs:mainfrom
rhassaine:fix/axis-tick-labels
Dec 3, 2026
Merged

ewels merged 1 commit into
seqeralabs:mainfrom
rhassaine:fix/axis-tick-labels

Conversation

@rhassaine

Copy link
Copy Markdown
Contributor

Spotted while comparing plots for #211: three plots truncate fractional y-axis ticks to whole numbers, so neighbouring ticks print the same label. This is already on main and independent of #211 (the two merge cleanly).

Plot Before (test data) After
RSeQC read duplication 0, 0, 1, 1, 2, 2 0, 1, 2
RSeQC junction saturation 0 on all 11 ticks 0, 0.005, … 0.05
Qualimap coverage profile / histogram 0, 0.5, 1, 2, 2, 3 0, 0.5, 1, 1.5, 2, 2.5
  • Read duplication: asks plotters for one tick per integer, like RSeQC's axis(side=2, at=0:ym).
  • Junction saturation: keeps the decimals instead of truncating, like R's default axis.
  • Qualimap: format_y_label keeps up to two decimals (still with thousands separators).

Only y-axis labels change; plotted data is identical. Unit tests added for both formatters.

🤖 Generated with Claude Code

Three plots truncated fractional tick values to whole numbers, so neighbouring
ticks printed the same label:

- RSeQC read duplication: plotters picked a 0.5 step, giving "0, 0, 1, 1, 2, 2".
  Ask for one tick per integer, as RSeQC's axis(side=2, at=0:ym) does.
- RSeQC junction saturation: small junction counts (in thousands) all printed
  as "0". Show the decimals, as R's default axis does.
- Qualimap coverage profile and coverage histogram: values >= 1 were rounded,
  giving "1, 2, 2, 3". Keep up to two decimals, with thousands separators.

Only the y-axis labels change; plotted data is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@ewels ewels left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thanks!

@ewels
ewels merged commit 2c167d0 into seqeralabs:main Dec 3, 2026
7 checks passed
@rhassaine
rhassaine deleted the fix/axis-tick-labels branch December 3, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants