Multi-quantitative track
TL;DR: a MultiQuantitativeTrack overlays many BigWig/bedGraph signals in
one display. Use the bigWigs array for quick absolute-URL setups, or
subadapters when you need relative URLs or per-subtrack color, group, and
source.
{
"type": "MultiQuantitativeTrack",
"trackId": "microarray_multi",
"name": "MultiWig",
"category": ["ENCODE bigWigs"],
"assemblyNames": ["hg19"],
"adapter": {
"type": "MultiWiggleAdapter",
"bigWigs": [
"https://www.encodeproject.org/files/ENCFF055ZII/@@download/ENCFF055ZII.bigWig",
"https://www.encodeproject.org/files/ENCFF826HEW/@@download/ENCFF826HEW.bigWig",
"https://www.encodeproject.org/files/ENCFF858LIM/@@download/ENCFF858LIM.bigWig",
"https://www.encodeproject.org/files/ENCFF425TNW/@@download/ENCFF425TNW.bigWig"
]
}
}
jbrowse add-track-json '{
"type": "MultiQuantitativeTrack",
"trackId": "microarray_multi",
"name": "MultiWig",
"category": ["ENCODE bigWigs"],
"assemblyNames": ["hg19"],
"adapter": {
"type": "MultiWiggleAdapter",
"bigWigs": [
"https://www.encodeproject.org/files/ENCFF055ZII/@@download/ENCFF055ZII.bigWig",
"https://www.encodeproject.org/files/ENCFF826HEW/@@download/ENCFF826HEW.bigWig",
"https://www.encodeproject.org/files/ENCFF858LIM/@@download/ENCFF858LIM.bigWig",
"https://www.encodeproject.org/files/ENCFF425TNW/@@download/ENCFF425TNW.bigWig"
]
}
}'
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": "microarray_multi",
"name": "MultiWig",
"category": ["ENCODE bigWigs"],
"assemblyNames": ["hg19"],
"adapter": {
"type": "MultiWiggleAdapter",
"bigWigs": [
"https://www.encodeproject.org/files/ENCFF055ZII/@@download/ENCFF055ZII.bigWig",
"https://www.encodeproject.org/files/ENCFF826HEW/@@download/ENCFF826HEW.bigWig",
"https://www.encodeproject.org/files/ENCFF858LIM/@@download/ENCFF858LIM.bigWig",
"https://www.encodeproject.org/files/ENCFF425TNW/@@download/ENCFF425TNW.bigWig"
]
}
}
The bigWigs shorthand only accepts absolute URLs; a relative path there
will not resolve against the config's location. Use the subadapters form for
relative URLs, which is also what you need for per-subtrack color, group,
and source.
The subadapters form
Each subtrack carries a source: its label in the UI, and feature.source in a
jexl color callback
(jexl:feature.source=='k1'?'red':'blue'). bigWigs derives it from the file
name; subadapters sets it explicitly (name is an alias, and source wins
when both are set), plus a default color and a group label
(MultiWiggleAdapter):
{
"type": "MultiQuantitativeTrack",
"trackId": "microarray_multi_groups",
"name": "MultiWig (groups)",
"category": ["ENCODE bigWigs"],
"assemblyNames": ["hg19"],
"adapter": {
"type": "MultiWiggleAdapter",
"subadapters": [
{
"type": "BigWigAdapter",
"source": "k1",
"color": "red",
"uri": "https://www.encodeproject.org/files/ENCFF055ZII/@@download/ENCFF055ZII.bigWig",
"group": "group1"
},
{
"type": "BigWigAdapter",
"source": "k2",
"color": "blue",
"uri": "https://www.encodeproject.org/files/ENCFF826HEW/@@download/ENCFF826HEW.bigWig",
"group": "group2"
}
]
}
}
jbrowse add-track-json '{
"type": "MultiQuantitativeTrack",
"trackId": "microarray_multi_groups",
"name": "MultiWig (groups)",
"category": ["ENCODE bigWigs"],
"assemblyNames": ["hg19"],
"adapter": {
"type": "MultiWiggleAdapter",
"subadapters": [
{
"type": "BigWigAdapter",
"source": "k1",
"color": "red",
"uri": "https://www.encodeproject.org/files/ENCFF055ZII/@@download/ENCFF055ZII.bigWig",
"group": "group1"
},
{
"type": "BigWigAdapter",
"source": "k2",
"color": "blue",
"uri": "https://www.encodeproject.org/files/ENCFF826HEW/@@download/ENCFF826HEW.bigWig",
"group": "group2"
}
]
}
}'
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": "microarray_multi_groups",
"name": "MultiWig (groups)",
"category": ["ENCODE bigWigs"],
"assemblyNames": ["hg19"],
"adapter": {
"type": "MultiWiggleAdapter",
"subadapters": [
{
"type": "BigWigAdapter",
"source": "k1",
"color": "red",
"uri": "https://www.encodeproject.org/files/ENCFF055ZII/@@download/ENCFF055ZII.bigWig",
"group": "group1"
},
{
"type": "BigWigAdapter",
"source": "k2",
"color": "blue",
"uri": "https://www.encodeproject.org/files/ENCFF826HEW/@@download/ENCFF826HEW.bigWig",
"group": "group2"
}
]
}
}
subadapters is an array of objects, so it templates from a samplesheet such as
an RNA-seq timecourse:
// rows: [{ timepoint: '0h', bigwig: 's3://.../t0.bw' }, ...]
const track = {
type: 'MultiQuantitativeTrack',
trackId: 'rnaseq-timecourse', // keep this stable across rebuilds
name: 'RNA-seq timecourse',
assemblyNames: ['hg38'],
adapter: {
type: 'MultiWiggleAdapter',
subadapters: rows.map(row => ({
type: 'BigWigAdapter',
source: row.timepoint,
uri: row.bigwig,
})),
},
}
Deploying JBrowse Web generates a whole config.json this way in a
CI/CD pipeline.
Loading bedMethyl as a multi-quantitative track
A bedMethyl from
modkit pileup reports the methylation
fraction at each CpG, one row per modification type. Bgzipped and tabix-indexed
(the methylation tutorial has the commands), it
loads through BedTabixAdapter as a MultiQuantitativeTrack with one subtrack
per modification type, which is also what a .bedmethyl.gz auto-detects as in
the Add track form:
{
"type": "MultiQuantitativeTrack",
"trackId": "sample_modkit",
"name": "CpG methylation (modkit)",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://yourhost/sample_modkit.bedmethyl.gz"
}
}
jbrowse add-track-json '{
"type": "MultiQuantitativeTrack",
"trackId": "sample_modkit",
"name": "CpG methylation (modkit)",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://yourhost/sample_modkit.bedmethyl.gz"
}
}'
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": "sample_modkit",
"name": "CpG methylation (modkit)",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "https://yourhost/sample_modkit.bedmethyl.gz"
}
}
JBrowse reads two columns: score (column 11), the percent methylation from 0
to 100, and name (column 4), the modification code (m for 5mC, h for 5hmC)
used as the subtrack label.