AlignmentsTrack
Auto-generated config schema for the current JBrowse release — see the
config guide for concepts. Provided by the alignments
plugin.
View source.
Example usage
A BAM track — swap the adapter to CramAdapter with a uri to a .cram for
CRAM:
{
type: 'AlignmentsTrack',
trackId: 'ngs-reads',
name: 'NGS reads',
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: 'ngs-reads',
uri: 'https://example.com/sample.bam',
assemblyNames: ['hg38'],
}
The same track with appearance settings in place. Rather than writing out the
full displays array, you can list them in a displayDefaults object — JBrowse
works out which display they belong to and applies them for you (here, the
LinearAlignmentsDisplay), so you don't have to know display names:
{
type: 'AlignmentsTrack',
trackId: 'ngs-reads',
name: 'NGS reads',
assemblyNames: ['hg38'],
adapter: {
type: 'BamAdapter',
uri: 'https://example.com/sample.bam',
},
displayDefaults: { colorBy: { type: 'pairOrientation' }, height: 250 },
}
See the Config slots section below for all available configuration fields.
has very little config; most config and state logic is on the display
Related links
- Display: LinearAlignmentsDisplay (state model)
- Adapter: BamAdapter
- Adapter: CramAdapter
- Adapter: HtsgetBamAdapter
- Adapter: SamAdapter
- Base config: BaseTrack
- Guide: Custom track and display types
- Guide: Supported file types
- Guide: Tracks
Config slots
These slots are top-level fields of the track config, alongside trackId and
name. 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 |
|---|---|
| Inherited from BaseTrack | 12 slots |
namestring = '' | descriptive name of the track, falls back to the trackId when unset |
assemblyNamesstringArray = ['assemblyName'] | name of the assembly (or assemblies) track belongs to |
descriptionstring = '' | a description of the track |
categorystringArray = [] | the category and sub-categories of a track |
metadatafrozen = {} | anything to add about this track |
adapterpluginManager.pluggableConfigSchemaType('adapter') | where this track's data comes from. Its type names the adapter for the file format (BamAdapter, Gff3TabixAdapter, ...) and the rest of the object is that adapter's own slots — see the adapter pages for each. Most adapters also accept a uri shorthand in place of writing their location slots out. |
textSearching.indexingAttributesstringArray = ['Name', 'ID', 'symbol'] | list of which feature attributes to index for text searching |
textSearching.indexingFeatureTypesToExcludestringArray = ['CDS', 'exon'] | list of feature types to exclude in text search index |
| textSearching.textSearchAdapter | a per-track name search index, normally a TrixTextSearchAdapter over what jbrowse text-index --tracks built. Without one, this track's features are only findable through an assembly-wide search adapter. |
displaystypes.array(pluginManager.pluggableConfigSchemaType('display')) | An array of full display configs, e.g. displays: [{ type: 'LinearBasicDisplay', color: 'green' }]. Each entry names a display type; use this when you need exact control — your own displayId, different settings for two displays, or choosing which display is the default.For the common case, prefer the displayDefaults shorthand instead — an object of appearance settings (e.g. displayDefaults: { color: 'green' }) that JBrowse routes to whichever display uses each setting, so you don't have to name the display or write the array.See the track config guide. |
formatDetailsFormatDetailsConfigSchemaFactory() | jexl callbacks that add, rewrite or hide fields in this track's feature-details panel. Four slots, listed at FormatDetails, and the same schema exists session-wide as configuration.formatDetails. |
formatAboutFormatAboutConfigSchemaFactory() | jexl callbacks that add, rewrite or hide fields in this track's About dialog. Two slots, listed at FormatAbout, and the same schema exists session-wide as configuration.formatAbout. |