Alignments track
Point an AlignmentsTrack at a BAM or CRAM with the uri shorthand and the
index resolves automatically. Coloring, height, and filtering are slots on the
LinearAlignmentsDisplay, set via displayDefaults.
Goes in the tracks array of config.json. See Tracks.
{
"type": "AlignmentsTrack",
"trackId": "my_alignments_track",
"name": "My Alignments",
"assemblyNames": ["hg19"],
"adapter": { "type": "BamAdapter", "uri": "https://yourhost/file.bam" },
"displayDefaults": { "color": { "field": "pairOrientation" }, "height": 250 }
}jbrowse add-track https://yourhost/file.bam \
--trackId my_alignments_track \
--name "My Alignments" \
--assemblyNames hg19 \
--displayDefaults '{"color":{"field":"pairOrientation"},"height":250}'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": "AlignmentsTrack",
"trackId": "my_alignments_track",
"name": "My Alignments",
"assemblyNames": ["hg19"],
"adapter": { "type": "BamAdapter", "uri": "https://yourhost/file.bam" },
"displayDefaults": { "color": { "field": "pairOrientation" }, "height": 250 }
}- The
urishorthand resolves the index (.baifor a BAM,.craifor a CRAM); add"csi": truefor a CSI-indexed BAM (theurishorthand) - CRAM decodes against the reference, and both adapters take their
sequenceAdapterfrom the enclosing assembly, so the track names none (BamAdapter, CramAdapter) color,height,featureHeight,filterByand the coverage band'sscales.yareLinearAlignmentsDisplayslots. Reads draw gray with mismatches marked untilcolornames a field —strand,pairOrientation,insertSizeortags.XX— andbaseColordraws modifications or base quality over them; the cookbook has the coloring, grouping and flag-filter recipe
Applying display settings opens a track in a given state from a link or an embedded view.