Multi-quantitative tracks
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.
MultiQuantitativeTrack config
Example MultiQuantitativeTrack config:
{
"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 source field
Each subtrack has a source identifier used as its label in the UI and carried
on features as feature.get('source'). When using bigWigs, source is
auto-derived from the URL filename. When using subadapters, set it explicitly.
name is an alias, and source takes priority if both are set.
Since features carry a source attribute, you can reference it in
jexl color callbacks, e.g.
jexl:feature.source=='k1'?'red':'blue'.
The subadapters slot also supports:
color- default subtrack colorgroup- grouping label for organizing subtracks
Example:
{
"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"
}
]
}
}
See the MultiWiggleAdapter config docs for all options.
Generating the subadapters from a samplesheet
Because subadapters is just an array of objects, it templates cleanly from
repetitive data like an RNA-seq timecourse. Given rows of
{ timepoint, bigwig }, build the track in a script:
// 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,
})),
},
}
See Deploying JBrowse Web for the full pattern of generating
config.json from a samplesheet in a CI/CD pipeline.
Loading bedMethyl as a multi-quantitative track
modkit pileup produces a
bedMethyl file, a
tab-separated BED format where each row reports the methylation fraction at a
single CpG position for one modification type (e.g. 5mC or 5hmC). It loads as
BedTabixAdapter and maps to MultiQuantitativeTrack, with one subtrack per
modification type:
modkit pileup sample.bam output.bedmethyl --ref reference.fa --preset traditional
bgzip output.bedmethyl
tabix -p bed output.bedmethyl.gz
--preset traditional produces 5mC calls (5hmC is combined into the 5mC
fraction). Omit it for separate 5mC and 5hmC rows.
{
"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"
}
}'
JBrowse reads two of the columns:
score(column 11) — the percent methylation, 0–100name(column 4) — the modification code, such asmfor 5mC orhfor 5hmC, used as the subtrack source label
In the "Add a track" form, pasting the URL to a .bedmethyl.gz file
auto-detects BedTabixAdapter and MultiQuantitativeTrack.