BamAdapter
Auto-generated config schema for the current JBrowse release — see the config guide for concepts. Provided by the alignments plugin. View source.
Example usage
The uri shorthand auto-resolves the .bai index (pass csi: true for a
.csi index). For a differently-named index, set index explicitly with
the full slot form:
{
type: 'AlignmentsTrack',
trackId: 'my_track',
name: 'My track',
assemblyNames: ['hg38'],
adapter: {
type: 'BamAdapter',
uri: 'https://example.com/sample.bam',
},
}
sample.bam infers BamAdapter and AlignmentsTrack on its own, and name defaults to the file name. In a config declaring one assembly, assemblyNames comes from there too — see the shortest track.
{
trackId: 'my_track',
uri: 'https://example.com/sample.bam',
assemblyNames: ['hg38'],
}
See the Config slots section below for all available configuration fields.
used to configure BAM adapter
Note: sequenceAdapter does not need to be specified manually — JBrowse
automatically supplies it from the enclosing assembly's sequence track.
Related links
- Track: AlignmentsTrack
- Display: LinearAlignmentsDisplay
- Config guide: Alignments track
- Guide: Supported file types
Config slots
These slots go inside the track's adapter: "adapter": { "type": "BamAdapter", ... }. It also accepts the shorthand keys uri, baseUri, csi in place of writing a location slot out. Slot types (fileLocation, frozen, ...) are explained in the config slot types reference. Slots a base configuration contributes are listed here too, so this table is the whole surface.
| Slot | Description |
|---|---|
bamLocationfileLocation = { uri: '/path/to/my.bam', locationType: 'UriLocation' } | location of the BAM file. Per-base mismatches come from the record's MD tag when it has one, and are otherwise computed against the assembly's reference sequence. |
index.indexTypestringEnum (BAI, CSI) = 'BAI' | BAI is the usual samtools index output. CSI is required for a reference longer than 512 Mb, which BAI cannot address. |
index.locationfileLocation = { uri: '/path/to/my.bam.bai', locationType: 'UriLocation' } | location of the index. Only needed when it is not named <file>.bam.bai (or .bam.csi), which is what the uri shorthand assumes. |
fetchSizeLimitnumber = 5_000_000 | size to fetch in bytes over which to display a warning to the user that too much data will be fetched advanced |
useBgzfWorkerPoolboolean = true | inflate BGZF blocks on a pool of workers rather than in the thread that asked advanced |
densityAdapterfrozen = null | optional quantitative sub-adapter (e.g. a BigWigAdapter over a features-per-bin bigWig) drawn as a density band where the region is too large to fetch features; null disables it |