JBrowse 2 · React App examples

SV inspector

Inspect a structural-variant VCF with a paired spreadsheet + circular view.

SvInspectorView pairs a spreadsheet of structural variants with a circular view, so clicking a row highlights the variant’s breakend loci in the circular view. It uses the same init shape as the spreadsheet view:

{
  type: 'SvInspectorView',
  init: {
    assembly: 'volvox',
    uri: 'test_data/volvox/volvox.dup.vcf.gz',
  },
}

Like every view type, this is declared as a defaultSession.views entry. See Linear synteny view for the general pattern. The fields init accepts come from the SvInspectorView model docs.

View source
import { JBrowse } from '@jbrowse/react-app2'

import { volvoxConfig } from '../volvoxConfig.ts'

export default function SvInspectorExample() {
  return (
    <JBrowse
      assemblies={volvoxConfig.assemblies}
      tracks={volvoxConfig.tracks}
      views={[
        {
          type: 'SvInspectorView',
          init: {
            assembly: 'volvox',
            uri: 'https://jbrowse.org/code/jb2/main/test_data/volvox/volvox.dup.vcf.gz',
          },
        },
      ]}
    />
  )
}