# Supported file types

Every track reads data through an `adapter` whose `type` selects the reader, and
the file's extension picks that type. Find your format in the tables below for
the adapter that reads it and a link to its full config docs. Most adapters
accept the [`uri` shorthand](#the-uri-shorthand), and a track over a format
listed here can skip both keys — see
[the whole-track shorthand](#the-whole-track-shorthand).

## The `uri` shorthand

Most adapters accept a `uri` shorthand: give the data file location and the
adapter resolves the companion index by appending the standard suffix (`.bai`
for a `.bam`, `.crai` for a `.cram`, `.fai` for a `.fa`, `.tbi` for a tabix
`.gz`, and so on).

```json addtrack
{
  "type": "AlignmentsTrack",
  "trackId": "sample_bam",
  "name": "Sample reads",
  "assemblyNames": ["hg38"],
  "adapter": {
    "type": "BamAdapter",
    "uri": "https://example.com/sample.bam"
  }
}
```

- **Spell out the slot form** (`bamLocation` plus `index.location`) only when
  the index is named differently or lives elsewhere. An adapter that takes an
  endpoint, a set of files, or another adapter has no shorthand; each adapter's
  config page states which keys it accepts above its slot table
- **Use CSI over TBI/BAI for a chromosome longer than 512 Mb** (some plant and
  animal genomes; CRAM's `.crai` has no such limit). BAM and the tabix-indexed
  adapters (VCF, GFF3, BED, BEDGRAPH, MAF, PAF) accept `csi: true`:

```json addtrack
{
  "type": "VariantTrack",
  "trackId": "variants_csi",
  "name": "Variants",
  "assemblyNames": ["hg38"],
  "adapter": {
    "type": "VcfTabixAdapter",
    "uri": "https://example.com/variants.vcf.gz",
    "csi": true
  }
}
```

## The whole-track shorthand

Every format in the tables below is one JBrowse recognizes by its extension, and
that inference runs on a track config too:

```json addtrack
{
  "trackId": "sample_bam",
  "uri": "https://example.com/sample.bam",
  "assemblyNames": ["hg38"]
}
```

The `Track type` column below names what the track becomes, the `Adapter` column
names what it reads through, `name` defaults to the file name, and a config
declaring exactly one assembly supplies `assemblyNames`. Write any of those keys
yourself to override the guess: an explicit `type` picks a track type the
extension would not, and an `adapter` block replaces the guessed one outright. A
format the tables do not list needs the full form, and so does a file whose
extension names one format while it holds another
([the shortest track](https://jbrowse.org/jb2/docs/config_guides/tracks#the-shortest-track)).

## Sequence / assembly

Sequence adapters go in an [assembly](https://jbrowse.org/jb2/docs/config_guides/assemblies), not a
track.

<!-- FILE_TYPES sequence START -->

<!-- prettier-ignore -->
| Format | Adapter | Track type | Notes |
| --- | --- | --- | --- |
| Bgzipped FASTA (.fa.gz + .fai + .gzi) | [](https://jbrowse.org/jb2/docs/config/bgzipfastaadapter) | assembly `sequence` |  |
| chrom.sizes | [](https://jbrowse.org/jb2/docs/config/chromsizesadapter) | assembly `sequence` | Names and lengths only, no sequence |
| Indexed FASTA (.fa + .fai) | [](https://jbrowse.org/jb2/docs/config/indexedfastaadapter) | assembly `sequence` |  |
| Plain FASTA (.fa, no index) | [](https://jbrowse.org/jb2/docs/config/unindexedfastaadapter) | assembly `sequence` | Read entirely into memory; prefer an indexed form for large genomes |
| UCSC 2bit | [](https://jbrowse.org/jb2/docs/config/twobitadapter) | assembly `sequence` |  |

<!-- FILE_TYPES sequence END -->

Most configs name no sequence adapter: give the assembly a `name` and a
sequence-file `uri`, and JBrowse picks the adapter from the extension and
derives the index siblings.

```json addassembly
{
  "name": "hg38",
  "uri": "https://example.com/genome.fa"
}
```

## Alignments

Read alignments are an `AlignmentsTrack`
([alignments track config](https://jbrowse.org/jb2/docs/config_guides/alignments_track)).

<!-- FILE_TYPES alignments START -->

<!-- prettier-ignore -->
| Format | Adapter | Track type | Notes |
| --- | --- | --- | --- |
| BAM | [](https://jbrowse.org/jb2/docs/config/bamadapter) | [](https://jbrowse.org/jb2/docs/config/alignmentstrack) |  |
| CRAM | [](https://jbrowse.org/jb2/docs/config/cramadapter) | [](https://jbrowse.org/jb2/docs/config/alignmentstrack) |  |
| Htsget BAM | [](https://jbrowse.org/jb2/docs/config/htsgetbamadapter) | [](https://jbrowse.org/jb2/docs/config/alignmentstrack) | Less exercised than plain BAM/CRAM; prefer an indexed file where possible |
| SAM | [](https://jbrowse.org/jb2/docs/config/samadapter) | [](https://jbrowse.org/jb2/docs/config/alignmentstrack) | Unindexed, so the whole file is loaded into memory; prefer BAM or CRAM for sequencing-scale data |

<!-- FILE_TYPES alignments END -->

## Feature / annotation

Gene models, repeats, and other interval features are a `FeatureTrack`. The
plain (non-tabix) GFF3, GTF and BED adapters load the whole file into memory, so
prefer the tabix or BigBed forms past small files.

<!-- FILE_TYPES feature START -->

<!-- prettier-ignore -->
| Format | Adapter | Track type | Notes |
| --- | --- | --- | --- |
| BED (plain) | [](https://jbrowse.org/jb2/docs/config/bedadapter) | [](https://jbrowse.org/jb2/docs/config/featuretrack) | Loaded entirely into memory; for small files |
| BED (tabix) | [](https://jbrowse.org/jb2/docs/config/bedtabixadapter) | [](https://jbrowse.org/jb2/docs/config/featuretrack) |  |
| BigBed | [](https://jbrowse.org/jb2/docs/config/bigbedadapter) | [](https://jbrowse.org/jb2/docs/config/featuretrack) |  |
| GFF3 (plain) | [](https://jbrowse.org/jb2/docs/config/gff3adapter) | [](https://jbrowse.org/jb2/docs/config/featuretrack) | Loaded entirely into memory; for small files |
| GFF3 (tabix) | [](https://jbrowse.org/jb2/docs/config/gff3tabixadapter) | [](https://jbrowse.org/jb2/docs/config/featuretrack) |  |
| GTF (plain) | [](https://jbrowse.org/jb2/docs/config/gtfadapter) | [](https://jbrowse.org/jb2/docs/config/featuretrack) | Loaded entirely into memory; for small files |
| GTF (tabix) | [](https://jbrowse.org/jb2/docs/config/gtftabixadapter) | [](https://jbrowse.org/jb2/docs/config/featuretrack) |  |

<!-- FILE_TYPES feature END -->

### GTF gene models

GTF has no spanning gene line, so the GTF adapters build the gene model
themselves: lines sharing a `transcript_id` group under a transcript, and
transcripts sharing a `gene_id` under a gene.
[`aggregateField`](https://jbrowse.org/jb2/docs/config/gtftabixadapter/#slot-aggregatefield) names the
attribute that labels the gene, and `jbrowse sort-gff` sorts a GTF for tabix too
([quickstart](https://jbrowse.org/jb2/docs/quickstart_web#gff3-and-gtf)).

## Quantitative / signal

Coverage and other numeric signals are a `QuantitativeTrack`
([quantitative](https://jbrowse.org/jb2/docs/config_guides/quantitative_track) and
[multi-quantitative](https://jbrowse.org/jb2/docs/config_guides/multiquantitative_track) track config).

<!-- FILE_TYPES quantitative START -->

<!-- prettier-ignore -->
| Format | Adapter | Track type | Notes |
| --- | --- | --- | --- |
| BedGraph (plain) | [](https://jbrowse.org/jb2/docs/config/bedgraphadapter) | [](https://jbrowse.org/jb2/docs/config/quantitativetrack) | Loaded entirely into memory; for small files |
| BedGraph (tabix) | [](https://jbrowse.org/jb2/docs/config/bedgraphtabixadapter) | [](https://jbrowse.org/jb2/docs/config/quantitativetrack) |  |
| BigWig | [](https://jbrowse.org/jb2/docs/config/bigwigadapter) | [](https://jbrowse.org/jb2/docs/config/quantitativetrack) |  |
| GC content | [](https://jbrowse.org/jb2/docs/config/gccontentadapter) | [](https://jbrowse.org/jb2/docs/config/quantitativetrack) | Computed from the assembly sequence, no data file |
| Multiple BigWigs | [](https://jbrowse.org/jb2/docs/config/multiwiggleadapter) | [](https://jbrowse.org/jb2/docs/config/multiquantitativetrack) |  |

<!-- FILE_TYPES quantitative END -->

## Variants

VCF and other variant-like data is a `VariantTrack`
([variant track config](https://jbrowse.org/jb2/docs/config_guides/variant_track) for SVTYPE coloring
and the multi-sample displays).

<!-- FILE_TYPES variants START -->

<!-- prettier-ignore -->
| Format | Adapter | Track type | Notes |
| --- | --- | --- | --- |
| BEDPE | [](https://jbrowse.org/jb2/docs/config/bedpeadapter) | [](https://jbrowse.org/jb2/docs/config/varianttrack) | Paired/breakend records, e.g. SV calls or Hi-C loops |
| Split VCF (one file per refName) | [](https://jbrowse.org/jb2/docs/config/splitvcftabixadapter) | [](https://jbrowse.org/jb2/docs/config/varianttrack) |  |
| STAR-Fusion | [](https://jbrowse.org/jb2/docs/config/starfusionadapter) | [](https://jbrowse.org/jb2/docs/config/varianttrack) |  |
| VCF (plain) | [](https://jbrowse.org/jb2/docs/config/vcfadapter) | [](https://jbrowse.org/jb2/docs/config/varianttrack) | Loaded entirely into memory; for small files |
| VCF (tabix) | [](https://jbrowse.org/jb2/docs/config/vcftabixadapter) | [](https://jbrowse.org/jb2/docs/config/varianttrack) |  |

<!-- FILE_TYPES variants END -->

## Synteny / comparative

Synteny adapters back the dotplot and linear synteny views
([synteny track config](https://jbrowse.org/jb2/docs/config_guides/synteny_track)). Plain PAF loads
entirely into memory; `jbrowse make-pif` converts a large alignment to PIF,
which fetches only the alignments in view
([large alignments](https://jbrowse.org/jb2/docs/cookbook#synteny-large-alignments),
[PIF format](https://jbrowse.org/jb2/docs/developer_guides/pif_format)).

<!-- FILE_TYPES synteny START -->

<!-- prettier-ignore -->
| Format | Adapter | Track type | Notes |
| --- | --- | --- | --- |
| BLAST tabular | [](https://jbrowse.org/jb2/docs/config/blasttabularadapter) | [](https://jbrowse.org/jb2/docs/config/syntenytrack) |  |
| Chain (UCSC liftOver / lastz) | [](https://jbrowse.org/jb2/docs/config/chainadapter) | [](https://jbrowse.org/jb2/docs/config/syntenytrack) |  |
| Delta (MUMmer / nucmer) | [](https://jbrowse.org/jb2/docs/config/deltaadapter) | [](https://jbrowse.org/jb2/docs/config/syntenytrack) |  |
| Indexed PAF (PIF) | [](https://jbrowse.org/jb2/docs/config/pairwiseindexedpafadapter) | [](https://jbrowse.org/jb2/docs/config/syntenytrack) | Built by `jbrowse make-pif`; fetches only the visible region |
| MashMap | [](https://jbrowse.org/jb2/docs/config/mashmapadapter) | [](https://jbrowse.org/jb2/docs/config/syntenytrack) |  |
| MCScan anchors | [](https://jbrowse.org/jb2/docs/config/mcscananchorsadapter) | [](https://jbrowse.org/jb2/docs/config/syntenytrack) | Gene-level synteny; also needs one BED per assembly |
| MCScan blocks | [](https://jbrowse.org/jb2/docs/config/mcscanblocksadapter) | [](https://jbrowse.org/jb2/docs/config/syntenytrack) | Multi-genome, reference-anchored; also needs one BED per assembly |
| MCScan simple anchors | [](https://jbrowse.org/jb2/docs/config/mcscansimpleanchorsadapter) | [](https://jbrowse.org/jb2/docs/config/syntenytrack) | Gene-level synteny; also needs one BED per assembly |
| Multi-genome indexed PAF (PIF) | [](https://jbrowse.org/jb2/docs/config/multigenomeindexedpafadapter) | [](https://jbrowse.org/jb2/docs/config/syntenytrack) | The tabix-indexed form of multi-genome PAF |
| Multi-genome PAF | [](https://jbrowse.org/jb2/docs/config/multigenomepafadapter) | [](https://jbrowse.org/jb2/docs/config/syntenytrack) | PanSN-prefixed; all-vs-all or a star against one reference, in one file |
| PAF | [](https://jbrowse.org/jb2/docs/config/pafadapter) | [](https://jbrowse.org/jb2/docs/config/syntenytrack) | Loaded entirely into memory; convert to PIF for large alignments |
| Several pairwise alignments sharing one genome | [](https://jbrowse.org/jb2/docs/config/multipairwisesyntenyadapter) | [](https://jbrowse.org/jb2/docs/config/syntenytrack) | One anchor genome aligned to each of N others, as N pairwise files |

<!-- FILE_TYPES synteny END -->

## Multiple alignment (MAF)

Multiple-species alignments are a `MafTrack`
([MAF track config](https://jbrowse.org/jb2/docs/config_guides/maf_track) for the samples array and the
zoom-out tier).

<!-- FILE_TYPES maf START -->

<!-- prettier-ignore -->
| Format | Adapter | Track type | Notes |
| --- | --- | --- | --- |
| BigMaf | [](https://jbrowse.org/jb2/docs/config/bigmafadapter) | [](https://jbrowse.org/jb2/docs/config/maftrack) |  |
| Indexed MAF (bgzip + .tai) | [](https://jbrowse.org/jb2/docs/config/bgzipmafadapter) | [](https://jbrowse.org/jb2/docs/config/maftrack) | A published whole-genome multiple alignment, read by locus |
| MAF (tabix) | [](https://jbrowse.org/jb2/docs/config/maftabixadapter) | [](https://jbrowse.org/jb2/docs/config/maftrack) |  |
| TAF (bgzipped Taffy) | [](https://jbrowse.org/jb2/docs/config/bgziptaffyadapter) | [](https://jbrowse.org/jb2/docs/config/maftrack) |  |

<!-- FILE_TYPES maf END -->

## Hi-C

<!-- FILE_TYPES hic START -->

<!-- prettier-ignore -->
| Format | Adapter | Track type |
| --- | --- | --- |
| .hic contact matrix | [](https://jbrowse.org/jb2/docs/config/hicadapter) | [](https://jbrowse.org/jb2/docs/config/hictrack) |

<!-- FILE_TYPES hic END -->

See [Hi-C track config](https://jbrowse.org/jb2/docs/config_guides/hic_track). Loop and interaction
calls are BEDPE, which loads as a `VariantTrack` (see [Variants](#variants)).

## GWAS / LD

See [GWAS track config](https://jbrowse.org/jb2/docs/config_guides/gwas_track).

<!-- FILE_TYPES gwas START -->

<!-- prettier-ignore -->
| Format | Adapter | Track type | Notes |
| --- | --- | --- | --- |
| GWAS results (bgzipped, tabix-indexed BED-like) | [](https://jbrowse.org/jb2/docs/config/gwasadapter) | [](https://jbrowse.org/jb2/docs/config/gwastrack) |  |
| PLINK LD (plain .ld) | [](https://jbrowse.org/jb2/docs/config/plinkldadapter) | [](https://jbrowse.org/jb2/docs/config/ldtrack) | PLINK LD table; for regional analyses |
| PLINK LD (tabix-indexed .ld.gz) | [](https://jbrowse.org/jb2/docs/config/plinkldtabixadapter) | [](https://jbrowse.org/jb2/docs/config/ldtrack) | For chromosome-scale or genome-wide LD |

<!-- FILE_TYPES gwas END -->

## Text searching

Text-search adapters power the location search box
([text searching](https://jbrowse.org/jb2/docs/config_guides/text_searching)).

<!-- FILE_TYPES textsearch START -->

<!-- prettier-ignore -->
| Format | Adapter | Track type | Notes |
| --- | --- | --- | --- |
| JBrowse 1 names index | [](https://jbrowse.org/jb2/docs/config/jbrowse1textsearchadapter) | `aggregateTextSearchAdapters` / `textSearching` | From JBrowse 1 `generate-names.pl` |
| Trix index (.ix/.ixx) | [](https://jbrowse.org/jb2/docs/config/trixtextsearchadapter) | `aggregateTextSearchAdapters` / `textSearching` | Built by `jbrowse text-index` |

<!-- FILE_TYPES textsearch END -->

## Inline data

A FromConfig adapter embeds a small dataset directly in `config.json`
([](https://jbrowse.org/jb2/docs/config_guides/from_config)).

<!-- FILE_TYPES inline START -->

<!-- prettier-ignore -->
| Format | Adapter | Track type | Notes |
| --- | --- | --- | --- |
| Inline features | [](https://jbrowse.org/jb2/docs/config/fromconfigadapter) | [](https://jbrowse.org/jb2/docs/config/featuretrack) | Features written straight into config.json |
| Inline regions | [](https://jbrowse.org/jb2/docs/config/fromconfigregionsadapter) | assembly `sequence` | refNames and sizes only, no sequence |
| Inline sequence | [](https://jbrowse.org/jb2/docs/config/fromconfigsequenceadapter) | assembly `sequence` | Each feature's `seq` holds the bases for its region |

<!-- FILE_TYPES inline END -->

## Computed from the reference

Three adapters scan the sequence of whatever assembly the track is displayed
against and emit the hits as features, so the track config names neither a file
nor a sequence. All three are [`FeatureTrack`](https://jbrowse.org/jb2/docs/config/featuretrack)s, and
each adapter page opens with a whole track config:

- [](https://jbrowse.org/jb2/docs/config/motiflistadapter) — a named motif list (restriction enzymes)
- [](https://jbrowse.org/jb2/docs/config/crisprguideadapter) — CRISPR guide RNAs
- [](https://jbrowse.org/jb2/docs/config/sequencesearchadapter) — a single regex

The [sequence search guide](https://jbrowse.org/jb2/docs/user_guides/sequence_search) drives them from
the view menu.

## See also

- [Configuring tracks](https://jbrowse.org/jb2/docs/config_guides/tracks)
- [Configuring assemblies](https://jbrowse.org/jb2/docs/config_guides/assemblies)
- [](https://jbrowse.org/jb2/docs/config_guides/deploying)
- [`@jbrowse/cli` command reference](https://jbrowse.org/jb2/docs/cli)

