# SplitVcfTabixAdapter

Auto-generated from the config schema in the source. See the [config guide](https://jbrowse.org/jb2/docs/config_guide) for concepts. Provided by the `variants` plugin. [View source](https://github.com/GMOD/jbrowse-components/blob/main/plugins/variants/src/SplitVcfTabixAdapter/configSchema.ts).

Reads a set of tabix-indexed VCF files, one per chromosome and keyed by
refName, for a large call set split by chromosome.

## Example usage

```js
{
  type: 'VariantTrack',
  trackId: 'my_track',
  name: 'My track',
  assemblyNames: ['hg38'],
  adapter: {
    type: 'SplitVcfTabixAdapter',
    vcfGzLocationMap: {
      chr1: { uri: 'chr1.vcf.gz' },
      chr2: { uri: 'chr2.vcf.gz' },
    },
    indexLocationMap: {
      chr1: { uri: 'chr1.vcf.gz.tbi' },
      chr2: { uri: 'chr2.vcf.gz.tbi' },
    },
  },
}
```

## Related links

- **Track:** [VariantTrack](../varianttrack)
- **Display:** [ChordVariantDisplay](../chordvariantdisplay)
- **Display:** [LinearMarkDisplay](../linearmarkdisplay)
- **Display:** [LinearVariantDisplay](../linearvariantdisplay)

## Config slots

Adapter slots go inside the track's `adapter`: `"adapter": { "type": "SplitVcfTabixAdapter", ... }`. `SplitVcfTabixAdapter` has no `uri` [shorthand](https://jbrowse.org/jb2/docs/config_guides/file_types#the-uri-shorthand) — give it the location slots below. Slot types (`fileLocation`, `frozen`, ...) are explained in the [config slot types reference](https://jbrowse.org/jb2/docs/config_guides/slot_types). Slots a base configuration contributes are listed here too, so this table is the whole surface.

| Slot | Description |
| --- | --- |
| **vcfGzLocationMap**<br>[`frozen`](https://jbrowse.org/jb2/docs/config_guides/slot_types#frozen) = <code>{}</code> | object like `{chr1:{uri:'url to file'}}` |
| **indexLocationMap**<br>[`frozen`](https://jbrowse.org/jb2/docs/config_guides/slot_types#frozen) = <code>{}</code> | object like `{chr1:{uri:'url to index'}}` |
| **indexType**<br>[`stringEnum`](https://jbrowse.org/jb2/docs/config_guides/slot_types#stringenum) (TBI, CSI) = <code>'TBI'</code> | index flavor for the entries this adapter derives, i.e. the ones `indexLocationMap` does not name. The adapter reads the kind of an index in the map from its `.csi`/`.tbi` extension, so one map can mix the two. `CSI` is required for a reference longer than 512 Mb, which TBI cannot address. |
| **fetchSizeLimit**<br>[`number`](https://jbrowse.org/jb2/docs/config_guides/slot_types#number) = <code>5000000</code> | The same 5 Mb `VcfTabixAdapter` declares, for the same reason: this adapter implements `getRegionByteSize`, so its reads are byte-gated, and without a limit on the adapter the gate falls back to the display config's conservative 1 Mb (`resolveByteLimit` prefers the adapter's). That gated a split VCF five times tighter than the single-file VCF beside it, on a block-granular tabix estimate that already over-quotes small regions.<br>_advanced_ |
| **samplesTsvLocation**<br>[`maybeFileLocation`](https://jbrowse.org/jb2/docs/config_guides/slot_types#the-maybe-types) | 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 names no samples (a MAF track discovering its species from the file) takes the table's rows as its samples |

