Mark display examples
Each section below is one complete track config for LinearMarkDisplay, the
picture it draws over a hosted file, and a link that opens the same view live.
The first ten read one file, UCSC's RepeatMasker Alu rows for hg38, whose
milliDiv column is a copy's divergence from its consensus; the rest read a BED
of read pairs, a set of copy-number BigWigs and a PAF of genome alignments. Copy
the config whose shape matches your file and change the field names.
Mark display explains each slot.
Bars from a column
y names the column, and the axis autoscales to what is on screen.
Goes in the tracks array of config.json. See Tracks.
{
"type": "FeatureTrack",
"trackId": "alu_bars",
"name": "Alu divergence",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_bars-LinearMarkDisplay",
"marks": [{ "mark": "bar", "encoding": { "y": "milliDiv" } }]
}
]
}jbrowse add-track-json '{
"type": "FeatureTrack",
"trackId": "alu_bars",
"name": "Alu divergence",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_bars-LinearMarkDisplay",
"marks": [{ "mark": "bar", "encoding": { "y": "milliDiv" } }]
}
]
}'In JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track..., choose Add track from pasted JSON, and paste:
{
"type": "FeatureTrack",
"trackId": "alu_bars",
"name": "Alu divergence",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_bars-LinearMarkDisplay",
"marks": [{ "mark": "bar", "encoding": { "y": "milliDiv" } }]
}
]
}Open this track in JBrowse Web ↗
Open this track in JBrowse Desktop ↗ (JBrowse Desktop 5.0+)
Points, colored and shaped by a category
Each point stands at the middle of its copy. The color and the shape each take a
categorical scale over strand, whose values are 1 and -1, so domain
names the levels and labels what the key calls them.
Goes in the tracks array of config.json. See Tracks.
{
"type": "FeatureTrack",
"trackId": "alu_points",
"name": "Alu divergence by strand",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_points-LinearMarkDisplay",
"marks": [
{
"mark": "point",
"encoding": {
"y": "milliDiv",
"size": 8,
"color": {
"field": "strand",
"domain": ["1", "-1"],
"labels": ["+", "-"],
"title": "Strand"
},
"shape": {
"field": "strand",
"domain": ["1", "-1"],
"range": ["circle", "triangle-down"],
"labels": ["+", "-"],
"title": ""
}
}
}
]
}
]
}jbrowse add-track-json '{
"type": "FeatureTrack",
"trackId": "alu_points",
"name": "Alu divergence by strand",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_points-LinearMarkDisplay",
"marks": [
{
"mark": "point",
"encoding": {
"y": "milliDiv",
"size": 8,
"color": {
"field": "strand",
"domain": ["1", "-1"],
"labels": ["+", "-"],
"title": "Strand"
},
"shape": {
"field": "strand",
"domain": ["1", "-1"],
"range": ["circle", "triangle-down"],
"labels": ["+", "-"],
"title": ""
}
}
}
]
}
]
}'In JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track..., choose Add track from pasted JSON, and paste:
{
"type": "FeatureTrack",
"trackId": "alu_points",
"name": "Alu divergence by strand",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_points-LinearMarkDisplay",
"marks": [
{
"mark": "point",
"encoding": {
"y": "milliDiv",
"size": 8,
"color": {
"field": "strand",
"domain": ["1", "-1"],
"labels": ["+", "-"],
"title": "Strand"
},
"shape": {
"field": "strand",
"domain": ["1", "-1"],
"range": ["circle", "triangle-down"],
"labels": ["+", "-"],
"title": ""
}
}
}
]
}
]
}Open this track in JBrowse Web ↗
Open this track in JBrowse Desktop ↗ (JBrowse Desktop 5.0+)
A color ramp
A linear scale over the plotted column, pinned at both ends so the colors mean
the same in every window. scheme names the ramp.
Goes in the tracks array of config.json. See Tracks.
{
"type": "FeatureTrack",
"trackId": "alu_ramp",
"name": "Alu divergence, viridis",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_ramp-LinearMarkDisplay",
"marks": [
{
"mark": "bar",
"encoding": {
"y": "milliDiv",
"color": {
"field": "milliDiv",
"scale": "linear",
"scheme": "viridis",
"domainMin": 0,
"domainMax": 300,
"title": "Divergence"
}
}
}
]
}
]
}jbrowse add-track-json '{
"type": "FeatureTrack",
"trackId": "alu_ramp",
"name": "Alu divergence, viridis",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_ramp-LinearMarkDisplay",
"marks": [
{
"mark": "bar",
"encoding": {
"y": "milliDiv",
"color": {
"field": "milliDiv",
"scale": "linear",
"scheme": "viridis",
"domainMin": 0,
"domainMax": 300,
"title": "Divergence"
}
}
}
]
}
]
}'In JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track..., choose Add track from pasted JSON, and paste:
{
"type": "FeatureTrack",
"trackId": "alu_ramp",
"name": "Alu divergence, viridis",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_ramp-LinearMarkDisplay",
"marks": [
{
"mark": "bar",
"encoding": {
"y": "milliDiv",
"color": {
"field": "milliDiv",
"scale": "linear",
"scheme": "viridis",
"domainMin": 0,
"domainMax": 300,
"title": "Divergence"
}
}
}
]
}
]
}Open this track in JBrowse Web ↗
Open this track in JBrowse Desktop ↗ (JBrowse Desktop 5.0+)
A color per interval
A threshold scale cuts the column at the values in domain and paints one
range color per interval, so a divergence reads as young, middle or old.
Goes in the tracks array of config.json. See Tracks.
{
"type": "FeatureTrack",
"trackId": "alu_threshold",
"name": "Alu age classes",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_threshold-LinearMarkDisplay",
"marks": [
{
"mark": "bar",
"encoding": {
"y": "milliDiv",
"color": {
"field": "milliDiv",
"scale": "threshold",
"domain": [80, 150],
"range": ["#d73027", "#fdae61", "#4575b4"],
"title": "Divergence"
}
}
}
]
}
]
}jbrowse add-track-json '{
"type": "FeatureTrack",
"trackId": "alu_threshold",
"name": "Alu age classes",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_threshold-LinearMarkDisplay",
"marks": [
{
"mark": "bar",
"encoding": {
"y": "milliDiv",
"color": {
"field": "milliDiv",
"scale": "threshold",
"domain": [80, 150],
"range": ["#d73027", "#fdae61", "#4575b4"],
"title": "Divergence"
}
}
}
]
}
]
}'In JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track..., choose Add track from pasted JSON, and paste:
{
"type": "FeatureTrack",
"trackId": "alu_threshold",
"name": "Alu age classes",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_threshold-LinearMarkDisplay",
"marks": [
{
"mark": "bar",
"encoding": {
"y": "milliDiv",
"color": {
"field": "milliDiv",
"scale": "threshold",
"domain": [80, 150],
"range": ["#d73027", "#fdae61", "#4575b4"],
"title": "Divergence"
}
}
}
]
}
]
}Open this track in JBrowse Web ↗
Open this track in JBrowse Desktop ↗ (JBrowse Desktop 5.0+)
A histogram
A bin step snaps each copy to a bin four pixels wide at any zoom, and an
aggregate counts the copies in each. The bar plots the count without naming
it.
Goes in the tracks array of config.json. See Tracks.
{
"type": "FeatureTrack",
"trackId": "alu_histogram",
"name": "Alu copies per bin",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_histogram-LinearMarkDisplay",
"scales": { "y": { "title": "Copies per bin" } },
"marks": [
{
"mark": "bar",
"transform": [
{ "type": "bin", "step": "auto" },
{ "type": "aggregate", "ops": [{ "op": "count" }] }
],
"encoding": { "color": { "value": "#7f7f7f" } }
}
]
}
]
}jbrowse add-track-json '{
"type": "FeatureTrack",
"trackId": "alu_histogram",
"name": "Alu copies per bin",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_histogram-LinearMarkDisplay",
"scales": { "y": { "title": "Copies per bin" } },
"marks": [
{
"mark": "bar",
"transform": [
{ "type": "bin", "step": "auto" },
{ "type": "aggregate", "ops": [{ "op": "count" }] }
],
"encoding": { "color": { "value": "#7f7f7f" } }
}
]
}
]
}'In JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track..., choose Add track from pasted JSON, and paste:
{
"type": "FeatureTrack",
"trackId": "alu_histogram",
"name": "Alu copies per bin",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_histogram-LinearMarkDisplay",
"scales": { "y": { "title": "Copies per bin" } },
"marks": [
{
"mark": "bar",
"transform": [
{ "type": "bin", "step": "auto" },
{ "type": "aggregate", "ops": [{ "op": "count" }] }
],
"encoding": { "color": { "value": "#7f7f7f" } }
}
]
}
]
}Open this track in JBrowse Web ↗
Open this track in JBrowse Desktop ↗ (JBrowse Desktop 5.0+)
A summary per bin
The same bins, with mean over the column in place of the count.
Goes in the tracks array of config.json. See Tracks.
{
"type": "FeatureTrack",
"trackId": "alu_mean",
"name": "Mean Alu divergence per bin",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_mean-LinearMarkDisplay",
"scales": { "y": { "title": "Mean divergence" } },
"marks": [
{
"mark": "bar",
"transform": [
{ "type": "bin", "step": "auto" },
{
"type": "aggregate",
"ops": [{ "op": "mean", "field": "milliDiv" }]
}
],
"encoding": { "color": { "value": "#7f7f7f" } }
}
]
}
]
}jbrowse add-track-json '{
"type": "FeatureTrack",
"trackId": "alu_mean",
"name": "Mean Alu divergence per bin",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_mean-LinearMarkDisplay",
"scales": { "y": { "title": "Mean divergence" } },
"marks": [
{
"mark": "bar",
"transform": [
{ "type": "bin", "step": "auto" },
{
"type": "aggregate",
"ops": [{ "op": "mean", "field": "milliDiv" }]
}
],
"encoding": { "color": { "value": "#7f7f7f" } }
}
]
}
]
}'In JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track..., choose Add track from pasted JSON, and paste:
{
"type": "FeatureTrack",
"trackId": "alu_mean",
"name": "Mean Alu divergence per bin",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_mean-LinearMarkDisplay",
"scales": { "y": { "title": "Mean divergence" } },
"marks": [
{
"mark": "bar",
"transform": [
{ "type": "bin", "step": "auto" },
{
"type": "aggregate",
"ops": [{ "op": "mean", "field": "milliDiv" }]
}
],
"encoding": { "color": { "value": "#7f7f7f" } }
}
]
}
]
}Open this track in JBrowse Web ↗
Open this track in JBrowse Desktop ↗ (JBrowse Desktop 5.0+)
A pileup
A pileup step writes each copy's row in a first-fit packing, and a span
draws the packing, colored by strand.
Goes in the tracks array of config.json. See Tracks.
{
"type": "FeatureTrack",
"trackId": "alu_pileup",
"name": "Alu copies, packed",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_pileup-LinearMarkDisplay",
"marks": [
{
"mark": "span",
"transform": [{ "type": "pileup", "padding": 200 }],
"encoding": {
"color": {
"field": "strand",
"domain": ["1", "-1"],
"labels": ["+", "-"],
"title": "Strand"
}
}
}
]
}
]
}jbrowse add-track-json '{
"type": "FeatureTrack",
"trackId": "alu_pileup",
"name": "Alu copies, packed",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_pileup-LinearMarkDisplay",
"marks": [
{
"mark": "span",
"transform": [{ "type": "pileup", "padding": 200 }],
"encoding": {
"color": {
"field": "strand",
"domain": ["1", "-1"],
"labels": ["+", "-"],
"title": "Strand"
}
}
}
]
}
]
}'In JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track..., choose Add track from pasted JSON, and paste:
{
"type": "FeatureTrack",
"trackId": "alu_pileup",
"name": "Alu copies, packed",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_pileup-LinearMarkDisplay",
"marks": [
{
"mark": "span",
"transform": [{ "type": "pileup", "padding": 200 }],
"encoding": {
"color": {
"field": "strand",
"domain": ["1", "-1"],
"labels": ["+", "-"],
"title": "Strand"
}
}
}
]
}
]
}Open this track in JBrowse Web ↗
Open this track in JBrowse Desktop ↗ (JBrowse Desktop 5.0+)
A facet
facet splits the copies on a field and stacks one section per value under a
chip. A pileup in the facet's own transform packs each section on its own.
Goes in the tracks array of config.json. See Tracks.
{
"type": "FeatureTrack",
"trackId": "alu_facet",
"name": "Alu copies by strand",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_facet-LinearMarkDisplay",
"facet": { "field": "strand", "transform": [{ "type": "pileup" }] },
"marks": [
{ "mark": "span", "encoding": { "color": { "value": "#4575b4" } } }
]
}
]
}jbrowse add-track-json '{
"type": "FeatureTrack",
"trackId": "alu_facet",
"name": "Alu copies by strand",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_facet-LinearMarkDisplay",
"facet": { "field": "strand", "transform": [{ "type": "pileup" }] },
"marks": [
{ "mark": "span", "encoding": { "color": { "value": "#4575b4" } } }
]
}
]
}'In JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track..., choose Add track from pasted JSON, and paste:
{
"type": "FeatureTrack",
"trackId": "alu_facet",
"name": "Alu copies by strand",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_facet-LinearMarkDisplay",
"facet": { "field": "strand", "transform": [{ "type": "pileup" }] },
"marks": [
{ "mark": "span", "encoding": { "color": { "value": "#4575b4" } } }
]
}
]
}Open this track in JBrowse Web ↗
Open this track in JBrowse Desktop ↗ (JBrowse Desktop 5.0+)
Labels
A text mark prints a field over each feature, culled where two labels would
overlap. maxBpPerPx stops the labels once the view is too wide to read them.
Goes in the tracks array of config.json. See Tracks.
{
"type": "FeatureTrack",
"trackId": "alu_labels",
"name": "Alu divergence, labelled",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_labels-LinearMarkDisplay",
"marks": [
{
"mark": "bar",
"encoding": { "y": "milliDiv", "color": { "value": "#c8d8ee" } }
},
{
"mark": "text",
"encoding": { "y": "milliDiv", "text": "name" },
"maxBpPerPx": 50
}
]
}
]
}jbrowse add-track-json '{
"type": "FeatureTrack",
"trackId": "alu_labels",
"name": "Alu divergence, labelled",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_labels-LinearMarkDisplay",
"marks": [
{
"mark": "bar",
"encoding": { "y": "milliDiv", "color": { "value": "#c8d8ee" } }
},
{
"mark": "text",
"encoding": { "y": "milliDiv", "text": "name" },
"maxBpPerPx": 50
}
]
}
]
}'In JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track..., choose Add track from pasted JSON, and paste:
{
"type": "FeatureTrack",
"trackId": "alu_labels",
"name": "Alu divergence, labelled",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_labels-LinearMarkDisplay",
"marks": [
{
"mark": "bar",
"encoding": { "y": "milliDiv", "color": { "value": "#c8d8ee" } }
},
{
"mark": "text",
"encoding": { "y": "milliDiv", "text": "name" },
"maxBpPerPx": 50
}
]
}
]
}Open this track in JBrowse Web ↗
Open this track in JBrowse Desktop ↗ (JBrowse Desktop 5.0+)
Reference lines and an axis title
scales.y holds the guides a reader checks a plot against: rules, lines at
chosen values, and title, the caption beside the axis.
Goes in the tracks array of config.json. See Tracks.
{
"type": "FeatureTrack",
"trackId": "alu_rules",
"name": "Alu divergence, with rules",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_rules-LinearMarkDisplay",
"scales": {
"y": {
"title": "Divergence, per mille",
"rules": [{ "value": 80, "color": "#d73027", "label": "young" }, 150]
}
},
"marks": [{ "mark": "bar", "encoding": { "y": "milliDiv" } }]
}
]
}jbrowse add-track-json '{
"type": "FeatureTrack",
"trackId": "alu_rules",
"name": "Alu divergence, with rules",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_rules-LinearMarkDisplay",
"scales": {
"y": {
"title": "Divergence, per mille",
"rules": [{ "value": 80, "color": "#d73027", "label": "young" }, 150]
}
},
"marks": [{ "mark": "bar", "encoding": { "y": "milliDiv" } }]
}
]
}'In JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track..., choose Add track from pasted JSON, and paste:
{
"type": "FeatureTrack",
"trackId": "alu_rules",
"name": "Alu divergence, with rules",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/gene_density/Alu.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "alu_rules-LinearMarkDisplay",
"scales": {
"y": {
"title": "Divergence, per mille",
"rules": [{ "value": 80, "color": "#d73027", "label": "young" }, 150]
}
},
"marks": [{ "mark": "bar", "encoding": { "y": "milliDiv" } }]
}
]
}Open this track in JBrowse Web ↗
Open this track in JBrowse Desktop ↗ (JBrowse Desktop 5.0+)
Links
A link draws a curve from x to x2. Over a BED of read pairs, each row
running from the leftmost read to the far end of its insert, that is one arc per
pair, stroked by its mapping quality.
Goes in the tracks array of config.json. See Tracks.
{
"type": "FeatureTrack",
"trackId": "pair_links",
"name": "NA12878 pairs over 1 kb, as arcs",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/read_marks/NA12878.chr20.discordant_pairs.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "pair_links-LinearMarkDisplay",
"marks": [
{
"mark": "link",
"transform": [
{ "type": "filter", "expr": "jexl:feature.tlen < 20000" }
],
"encoding": {
"color": {
"field": "score",
"scale": "linear",
"domainMin": 0,
"domainMax": 60,
"range": ["#bdbdbd", "#1f4e9a"],
"title": "Mapping quality"
}
}
}
]
}
]
}jbrowse add-track-json '{
"type": "FeatureTrack",
"trackId": "pair_links",
"name": "NA12878 pairs over 1 kb, as arcs",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/read_marks/NA12878.chr20.discordant_pairs.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "pair_links-LinearMarkDisplay",
"marks": [
{
"mark": "link",
"transform": [
{ "type": "filter", "expr": "jexl:feature.tlen < 20000" }
],
"encoding": {
"color": {
"field": "score",
"scale": "linear",
"domainMin": 0,
"domainMax": 60,
"range": ["#bdbdbd", "#1f4e9a"],
"title": "Mapping quality"
}
}
}
]
}
]
}'In JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track..., choose Add track from pasted JSON, and paste:
{
"type": "FeatureTrack",
"trackId": "pair_links",
"name": "NA12878 pairs over 1 kb, as arcs",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://jbrowse.org/demos/read_marks/NA12878.chr20.discordant_pairs.bed.gz"
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "pair_links-LinearMarkDisplay",
"marks": [
{
"mark": "link",
"transform": [
{ "type": "filter", "expr": "jexl:feature.tlen < 20000" }
],
"encoding": {
"color": {
"field": "score",
"scale": "linear",
"domainMin": 0,
"domainMax": 60,
"range": ["#bdbdbd", "#1f4e9a"],
"title": "Mapping quality"
}
}
}
]
}
]
}Open this track in JBrowse Web ↗
Open this track in JBrowse Desktop ↗ (JBrowse Desktop 5.0+)
One row per file
Over a multi-BigWig, rows: "source" gives each file a row on one shared axis,
with the row labels, Sort rows by value here and Cluster rows by
similarity... in the track menu.
Goes in the tracks array of config.json. See Tracks.
{
"type": "MultiQuantitativeTrack",
"trackId": "pur_cnv_rows",
"name": "Copy number, six PUR individuals",
"assemblyNames": ["hg38"],
"adapter": {
"type": "MultiWiggleAdapter",
"bigWigs": [
"https://jbrowse.org/genomes/GRCh38/1000g/kidd_lab_cnv/PUR/HG01177.qm2.CN.1k.bw",
"https://jbrowse.org/genomes/GRCh38/1000g/kidd_lab_cnv/PUR/HG01083.qm2.CN.1k.bw",
"https://jbrowse.org/genomes/GRCh38/1000g/kidd_lab_cnv/PUR/HG01070.qm2.CN.1k.bw",
"https://jbrowse.org/genomes/GRCh38/1000g/kidd_lab_cnv/PUR/HG01395.qm2.CN.1k.bw",
"https://jbrowse.org/genomes/GRCh38/1000g/kidd_lab_cnv/PUR/HG00731.qm2.CN.1k.bw",
"https://jbrowse.org/genomes/GRCh38/1000g/kidd_lab_cnv/PUR/HG00553.qm2.CN.1k.bw"
]
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "pur_cnv_rows-LinearMarkDisplay",
"rows": "source",
"scales": { "y": { "domainMin": 0, "domainMax": 10, "title": "Copies" } },
"marks": [
{
"mark": "bar",
"encoding": { "y": "score", "color": { "value": "#4575b4" } }
}
]
}
]
}jbrowse add-track-json '{
"type": "MultiQuantitativeTrack",
"trackId": "pur_cnv_rows",
"name": "Copy number, six PUR individuals",
"assemblyNames": ["hg38"],
"adapter": {
"type": "MultiWiggleAdapter",
"bigWigs": [
"https://jbrowse.org/genomes/GRCh38/1000g/kidd_lab_cnv/PUR/HG01177.qm2.CN.1k.bw",
"https://jbrowse.org/genomes/GRCh38/1000g/kidd_lab_cnv/PUR/HG01083.qm2.CN.1k.bw",
"https://jbrowse.org/genomes/GRCh38/1000g/kidd_lab_cnv/PUR/HG01070.qm2.CN.1k.bw",
"https://jbrowse.org/genomes/GRCh38/1000g/kidd_lab_cnv/PUR/HG01395.qm2.CN.1k.bw",
"https://jbrowse.org/genomes/GRCh38/1000g/kidd_lab_cnv/PUR/HG00731.qm2.CN.1k.bw",
"https://jbrowse.org/genomes/GRCh38/1000g/kidd_lab_cnv/PUR/HG00553.qm2.CN.1k.bw"
]
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "pur_cnv_rows-LinearMarkDisplay",
"rows": "source",
"scales": { "y": { "domainMin": 0, "domainMax": 10, "title": "Copies" } },
"marks": [
{
"mark": "bar",
"encoding": { "y": "score", "color": { "value": "#4575b4" } }
}
]
}
]
}'In JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track..., choose Add track from pasted JSON, and paste:
{
"type": "MultiQuantitativeTrack",
"trackId": "pur_cnv_rows",
"name": "Copy number, six PUR individuals",
"assemblyNames": ["hg38"],
"adapter": {
"type": "MultiWiggleAdapter",
"bigWigs": [
"https://jbrowse.org/genomes/GRCh38/1000g/kidd_lab_cnv/PUR/HG01177.qm2.CN.1k.bw",
"https://jbrowse.org/genomes/GRCh38/1000g/kidd_lab_cnv/PUR/HG01083.qm2.CN.1k.bw",
"https://jbrowse.org/genomes/GRCh38/1000g/kidd_lab_cnv/PUR/HG01070.qm2.CN.1k.bw",
"https://jbrowse.org/genomes/GRCh38/1000g/kidd_lab_cnv/PUR/HG01395.qm2.CN.1k.bw",
"https://jbrowse.org/genomes/GRCh38/1000g/kidd_lab_cnv/PUR/HG00731.qm2.CN.1k.bw",
"https://jbrowse.org/genomes/GRCh38/1000g/kidd_lab_cnv/PUR/HG00553.qm2.CN.1k.bw"
]
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "pur_cnv_rows-LinearMarkDisplay",
"rows": "source",
"scales": { "y": { "domainMin": 0, "domainMax": 10, "title": "Copies" } },
"marks": [
{
"mark": "bar",
"encoding": { "y": "score", "color": { "value": "#4575b4" } }
}
]
}
]
}Open this track in JBrowse Web ↗
Open this track in JBrowse Desktop ↗ (JBrowse Desktop 5.0+)
Percent identity along an alignment
A PAF's SyntenyTrack takes the mark display too. Each alignment's identity
comes from minimap2's de divergence tag, or from its match count over its
alignment length in a PAF without one. A rule at that value across each
alignment is a percent identity plot, the picture
PipMaker drew for a pair of genomes.
Stretches with no rule are where nothing aligned. Coloring each rule by the same
value separates short alignments that overlap, and showLegend is off because
the axis already reads the color.
Goes in the tracks array of config.json. See Tracks.
{
"type": "SyntenyTrack",
"trackId": "hpylori_identity",
"name": "26695 against J99, percent identity",
"assemblyNames": ["GCF_000982695.1", "GCF_000307795.1"],
"adapter": {
"type": "PairwiseIndexedPAFAdapter",
"uri": "https://jbrowse.org/demos/hpylori/26695_vs_j99.pif.gz",
"assemblyNames": ["GCF_000982695.1", "GCF_000307795.1"]
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "hpylori_identity-LinearMarkDisplay",
"showLegend": false,
"scales": {
"y": { "domainMin": 0.5, "domainMax": 1, "title": "Identity" }
},
"marks": [
{
"mark": "rule",
"encoding": {
"y": "identity",
"size": 4,
"color": {
"field": "identity",
"scale": "linear",
"scheme": "viridis",
"domainMin": 0.7,
"domainMax": 1,
"title": "Identity"
}
}
}
]
}
]
}jbrowse add-track-json '{
"type": "SyntenyTrack",
"trackId": "hpylori_identity",
"name": "26695 against J99, percent identity",
"assemblyNames": ["GCF_000982695.1", "GCF_000307795.1"],
"adapter": {
"type": "PairwiseIndexedPAFAdapter",
"uri": "https://jbrowse.org/demos/hpylori/26695_vs_j99.pif.gz",
"assemblyNames": ["GCF_000982695.1", "GCF_000307795.1"]
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "hpylori_identity-LinearMarkDisplay",
"showLegend": false,
"scales": {
"y": { "domainMin": 0.5, "domainMax": 1, "title": "Identity" }
},
"marks": [
{
"mark": "rule",
"encoding": {
"y": "identity",
"size": 4,
"color": {
"field": "identity",
"scale": "linear",
"scheme": "viridis",
"domainMin": 0.7,
"domainMax": 1,
"title": "Identity"
}
}
}
]
}
]
}'In JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track..., choose Add track from pasted JSON, and paste:
{
"type": "SyntenyTrack",
"trackId": "hpylori_identity",
"name": "26695 against J99, percent identity",
"assemblyNames": ["GCF_000982695.1", "GCF_000307795.1"],
"adapter": {
"type": "PairwiseIndexedPAFAdapter",
"uri": "https://jbrowse.org/demos/hpylori/26695_vs_j99.pif.gz",
"assemblyNames": ["GCF_000982695.1", "GCF_000307795.1"]
},
"displays": [
{
"type": "LinearMarkDisplay",
"displayId": "hpylori_identity-LinearMarkDisplay",
"showLegend": false,
"scales": {
"y": { "domainMin": 0.5, "domainMax": 1, "title": "Identity" }
},
"marks": [
{
"mark": "rule",
"encoding": {
"y": "identity",
"size": 4,
"color": {
"field": "identity",
"scale": "linear",
"scheme": "viridis",
"domainMin": 0.7,
"domainMax": 1,
"title": "Identity"
}
}
}
]
}
]
}That shows it in the linear view. For the synteny view, open Add → Linear synteny view, pick the track under Quick start, and click Launch.
Open this track in JBrowse Web ↗
Open this track in JBrowse Desktop ↗ (JBrowse Desktop 5.0+)
A PAF line has one identity for the whole alignment, so a long alignment draws as one flat line however its identity varies along its length. An all-vs-all PAF gives one row per genome, which the all-vs-all synteny tutorial walks through.
More
Mark display shows a density and the raw features in one track across zooms and a facet over a BAM's haplotype tag; A grammar of graphics over a BED (RepeatMasker Alu age) and A grammar of graphics over a BAM (NA12878 insert size) each take one file through a question.