Gene Arrow Maps in the CanvasXpress Genome Browser
▶ Gene arrow map (gggenes-style)
If you work with gene clusters, operons, synteny, or any comparison of genomic neighborhoods, you know the visual vocabulary: genes drawn as arrows, each arrowhead pointing in the direction of transcription, stacked one molecule per row so you can read strandedness and arrangement at a glance. The R community has gggenes and its geom_gene_arrow for exactly this. CanvasXpress now brings the same gene-arrow map directly into its genome browser.
What it looks like
Turn on arrow rendering and every gene feature in a Genome chart is drawn as an arrow-capped glyph. The body of the gene is a rectangle, as before, but the terminal end is drawn as a flaring arrowhead that points the way the gene is transcribed — forward genes point right, reverse genes point left. The arrowhead flares taller than the body, the same crisp silhouette gggenes users expect, so direction reads instantly even in a dense cluster. Introns keep their connector lines, exons keep their shape, and molecules stack as separate feature tracks so several genomes or contigs can be compared row by row.
A fill-by-gene color legend ties it together: color each gene by identity and a legend maps the colors to gene names, exactly like coloring a gggenes map by the gene aesthetic.
Turning it on
Gene arrows are a render style on the existing feature track, so any genome chart you already have can adopt them with a single parameter. Set featureStyle to "arrow" globally or per track:
{
"graphType": "Genome",
"featureStyle": "arrow",
"featureArrowheadWidth": 12,
"featureArrowheadHeight": 0,
"featureLegend": true
}
featureStyle—"box"(the default, unchanged) or"arrow"for gene-arrow rendering.featureArrowheadWidth— length of the arrowhead in pixels.featureArrowheadHeight— how tall the flaring head is;0picks a naturalgggenes-like flare about 1.4× the body height.featureLegend— draw the fill-by-gene legend.
Direction can come from the feature's dir field, or you can set a per-feature forward boolean — true points right, false points left — which reads naturally when your table already records strand. You can also override the style on an individual feature with its own shape: "arrow", mixing arrow genes and box features in the same track when that is what the biology calls for.
Because arrows are a style on the existing box renderer rather than a new chart type, the default is "box" and every genome chart you have today renders exactly as before. Opt in only where you want it.
Why it belongs in the genome browser
The point of a gene-arrow map is not decoration — it is that shape carries meaning. Strand, order, and overlap are the whole story in a comparative genomics figure, and an arrow encodes all three without a legend. Drawing the arrows inside the CanvasXpress genome browser means they sit on the same genomic coordinate axis as every other track: your variant density, your coverage histogram, your sequence logos, your heatmaps. Zoom, pan, and tooltips all work the same way. You are not pasting a separate gggenes figure next to your browser — the gene map is a track in the browser.
And because every CanvasXpress render exports cleanly to SVG and PDF through the same path, a gene-arrow map you build interactively drops straight into a publication figure at vector quality, arrowheads and all.
A small example
A handful of genes across two contigs, colored by gene identity, pointing by strand:
{
"graphType": "Genome",
"featureStyle": "arrow",
"featureLegend": true,
"tracks": [
{ "name": "Contig A", "type": "box", "data": [
{ "id": "geneA", "start": 100, "end": 900, "forward": true, "fill": "steelblue" },
{ "id": "geneB", "start": 1200, "end": 1700, "forward": false, "fill": "darkorange" }
]},
{ "name": "Contig B", "type": "box", "data": [
{ "id": "geneA", "start": 150, "end": 1000, "forward": true, "fill": "steelblue" },
{ "id": "geneC", "start": 1300, "end": 2100, "forward": true, "fill": "seagreen" }
]}
]
}
Two molecule tracks, arrows pointing by strand, shared colors across contigs so homologous genes line up by eye, and one legend naming them. That is a synteny figure in a dozen lines of configuration — interactive in the browser, publication-ready on export.
The bigger picture
Gene-arrow maps join a growing set of genomics glyphs in the CanvasXpress browser — sequence logos, whole-genome karyotypes, Manhattan and Miami plots — all sharing one coordinate system and one export pipeline. If your figure needs genes as arrows, you no longer need to leave the browser to draw them.