JBrowse 2 · Circular Genome View examples

Tracks as an id and a uri

The extension picks the track type and the adapter.

Supported file types lists what each extension resolves to. A key beside uri overrides what was inferred, and displayDefaults reaches the display that declares the slot, here the chords’ color. Spell type and adapter out when the file name does not decide the format.

Show source · 21 linesHide source · 21 lines
import { CircularGenomeView } from '@jbrowse/react-circular-genome-view2'

export default function TrackShorthand() {
  return (
    <CircularGenomeView
      assembly={{
        name: 'volvox',
        uri: 'https://jbrowse.org/genomes/volvox/volvox.2bit',
      }}
      tracks={[
        {
          trackId: 'volvox_sv',
          uri: 'https://jbrowse.org/code/jb2/main/test_data/volvox/volvox.dup.vcf.gz',
          name: 'Volvox breakends',
          displayDefaults: { encoding: { color: { value: 'purple' } } },
        },
      ]}
      view={{ tracks: ['volvox_sv'] }}
    />
  )
}