A More Faithful, More Consistent Genome Browser

The CanvasXpress genome browser has grown quickly — gene-arrow maps, sequence-logo tracks, whole-genome karyotypes, mirrored Manhattan plots — and with growth comes the quiet work of keeping the foundation honest. A recent round of engineering did exactly that: it fixed a long-standing alignment glitch, tightened the drawing code so every track type shares the same coordinate math, and strengthened the checks that keep a chart looking right. None of it adds a new chart type. All of it makes the genome view you already use more accurate and more trustworthy.

The fix you can see

The headline change is a correction you can see with your own eyes. In certain genome charts, a data track's bars did not sit exactly on their axis baseline — they floated a handful of pixels above the zero tick. The cause was subtle: the data layer and the axis layer were being clipped and rasterized on slightly different disciplines, so bar bottoms and tick marks landed on marginally different baselines.

That is now corrected. Bars anchor on the zero tick, in both the live canvas and in exported images, pixel-for-pixel. If you have ever squinted at a genome bar track wondering whether a value really touched the axis, you can stop squinting.

One coordinate system, used everywhere

Behind the scenes, the genome renderer had accumulated several copies of the same arithmetic — multiple places that computed a bar's baseline, several independent derivations of an axis minimum, more than one walk over the track-and-feature layout, and roughly twenty inlined conversions from a genomic position to a screen coordinate. Each copy was correct on its own, but duplication is where drift begins: fix a rounding detail in one place and the others quietly disagree.

Those copies have been consolidated into shared helpers:

The safety property for this kind of work is strict: every existing genome chart renders byte-for-byte identically to before. Consolidation that changed a pixel would be a bug, not an improvement. The practical payoff for you is subtler but real — every track type now measures the genome the same way, so a bar track, a histogram overlay, a heatmap, and a karyotype panel all agree on where a coordinate lands. Consistency across tracks is exactly what a genome browser must get right, because the whole point is to line features up on a shared axis.

Catching a wrong picture before it ships

The other half of the work was about process, and it benefits anyone who builds genome examples. A chart can be internally self-consistent — it renders the same way every time — and still be wrong, if the configuration that produced it was off. The remedy is a creation-time habit now baked into the example workflow: a new genome example must be eyeballed against its intended render before its reference image is accepted. A self-consistent image is not proof of correctness; a human look is.

As part of the same pass, the existing genome and karyotype examples were each opened and checked against what they were meant to show, their reference images regenerated from the corrected renders, and their gallery thumbnails brought up to date.

Nothing to change on your end

There is no new parameter to learn and no migration to do. The genome charts you have keep working, and they render identically — except for the one case that was genuinely wrong, which now renders right. What you gain is a browser whose tracks share one coordinate system, whose bars sit where they should, and whose examples are verified by eye before they ship.

It is the kind of improvement that is easy to overlook precisely because, done well, it leaves everything looking the same — only now you can trust that it is. For a tool whose entire job is to place genomic features accurately on a shared axis, that trust is the feature.