CramAdapter
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 .crai index:
{
type: 'AlignmentsTrack',
trackId: 'my_track',
name: 'My track',
assemblyNames: ['hg38'],
adapter: {
type: 'CramAdapter',
uri: 'https://example.com/sample.cram',
},
}
sample.cram infers CramAdapter 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.cram',
assemblyNames: ['hg38'],
}
See the Config slots section below for all available configuration fields.
sequenceAdapter is filled in automatically from the enclosing assembly's
sequence track — you never specify it.
Reads CRAM alignments, fetching only the containers overlapping the visible
region through the .crai index. Decoding happens against that assembly's
sequence, so it has to be the reference the file was compressed against; a
mismatched one isn't rejected, it just decodes into mismatches.
Related links
- Track: AlignmentsTrack
- Display: LinearAlignmentsDisplay
- Guide: Alignments track
- Guide: Supported file types
Config slots
These slots go inside the track's adapter:
"adapter": { "type": "CramAdapter", ... }. It also accepts the
shorthand keys uri,
baseUri 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 |
|---|---|
fetchSizeLimitnumber = 5_000_000 | size in bytes over which to display a warning to the user that too much data will be fetched advanced |
useSliceWorkerPoolboolean = true | decode CRAM slices on a pool of workers rather than in the thread that asked advanced |
cramLocationfileLocation = { uri: '/path/to/my.cram', locationType: 'UriLocation' } | location of the CRAM file |
craiLocationfileLocation = { uri: '/path/to/my.cram.crai', locationType: 'UriLocation' } | location of the CRAM index (.crai). Only needed when it is not named <file>.cram.crai, which is what the uri shorthand assumes. |