VcfTabixAdapter
Auto-generated from the config schema in the source — see the config guide for concepts. Provided by the variants plugin. View source.
Example usage
The uri shorthand auto-resolves the .tbi index (pass csi: true for a
.csi index):
{
type: 'VariantTrack',
trackId: 'my_track',
name: 'My track',
assemblyNames: ['hg38'],
adapter: {
type: 'VcfTabixAdapter',
uri: 'https://example.com/variants.vcf.gz',
},
}variants.vcf.gz infers VcfTabixAdapter and VariantTrack 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/variants.vcf.gz',
assemblyNames: ['hg38'],
}See the Config slots section below for all available configuration fields.
TBI cannot index a chromosome longer than 512 Mb, which some plant and animal genomes exceed. Index those with CSI instead: pass csi: true alongside the uri shorthand, or set both index.location and index.indexType: 'CSI' explicitly.
used to load bgzip-compressed, tabix-indexed VCF files
Related links
- Track: VariantTrack
- Display: ChordVariantDisplay
- Display: LinearMarkDisplay
- Display: LinearMultiSampleVariantDisplay
- Display: LinearVariantDisplay
- Guide: Mutation cohort (TCGA)
- Guide: Pangenome (HPRC) part 1: the graph's alleles and the haplotypes that have them
- Guide: Supported file types
Config slots
These slots go inside the track's adapter: "adapter": { "type": "VcfTabixAdapter", ... }. 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 |
|---|---|
vcfGzLocationfileLocation = { uri: '/path/to/my.vcf.gz', locationType: 'UriLocation' } | location of the bgzip-compressed VCF, sorted by position. Must be bgzip rather than plain gzip, which tabix cannot index. |
| index TabixIndex | where the tabix index is and which kind it is. The uri shorthand derives both, so a config using it states neither. |
fetchSizeLimitnumber = 5_000_000 | Matches the feature-track default (5 Mb): the tabix byte estimate is block-granular (a small region still pulls whole BGZF blocks), so a tighter gate trips on routine variant views. VCF text downloads fast; the feature-density gate remains the backstop for genuinely over-dense views. advanced |
samplesTsvLocationmaybeFileLocation | optional tab-separated table of per-sample metadata. It needs a header row, and its first column is the sample name exactly as the adapter spells it: a VCF sample, a MultiWiggle subtrack's name, a MAF species id. Every other column (population, tissue, ...) becomes an attribute of that sample, which the multi-row displays group, sort, color and tooltip rows by; a MAF adapter reads the label, color and assemblyName columns onto its species rows, over its samples entries. The table also narrows the adapter's samples to the ones it lists, and a table naming none of them is an error. An adapter that lists no samples of its own (a MAF track discovering its species from the file) takes the table's rows as its samples |
densityAdaptermaybeFrozen | 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; leave it unset to disable |