SamAdapter
Auto-generated config schema for the current JBrowse release — see the
config guide for concepts. Provided by the alignments
plugin.
View source.
Example usage
{
type: 'AlignmentsTrack',
trackId: 'my_track',
name: 'My track',
assemblyNames: ['hg38'],
adapter: {
type: 'SamAdapter',
uri: 'https://example.com/sample.sam',
},
}
sample.sam infers SamAdapter 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.sam',
assemblyNames: ['hg38'],
}
See the Config slots section below for all available configuration fields.
plain-text SAM, either a file or an inline string
There is no index, so the whole file is loaded and held in memory — this is for small files (a BLAT result, a handful of assembled contigs, a test case). Use BAM or CRAM for anything sequencing-scale.
Note: sequenceAdapter does not need to be specified manually — JBrowse
automatically supplies it from the enclosing assembly's sequence track. It is
what per-base mismatches are computed against for records with no MD tag.
Related links
- Track: AlignmentsTrack
- Display: LinearAlignmentsDisplay
- Guide: Supported file types
Config slots
These slots go inside the track's adapter:
"adapter": { "type": "SamAdapter", ... }. 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 |
|---|---|
samLocationfileLocation = { uri: '/path/to/my.sam', locationType: 'UriLocation' } | location of the SAM file, header lines included. Ignored when samText supplies the alignment inline. |
samTexttext = '' | SAM text supplied inline instead of from samLocation, header lines included. Takes precedence when set. Lets an alignment produced in the browser — a BLAT hit converted from PSL, for instance — persist in a session without a file behind it. |