JBrowse 2 · Linear Genome View examples

A picture first, then the view

A screenshot paints with the page; the engine loads near the viewport.

NCBI RefSeq genes at SHH, chr7:155,799,529..155,812,871

The poster is a screenshot of this page’s own live view, written by pnpm capture-poster. Why each part is there: a picture first, then the view.

Show source · 43 linesHide source · 43 lines
import { lazy } from 'react'

import { PosterFirst } from '@jbrowse/display-ui/embed'

const LinearGenomeView = lazy(async () => ({
  default: (await import('@jbrowse/react-linear-genome-view2'))
    .LinearGenomeView,
}))

export default function StaticFirstPaint() {
  return (
    <PosterFirst
      poster={{
        src: '/storybook/lgv/static-first-paint.png',
        width: 800,
        height: 232,
      }}
      alt="NCBI RefSeq genes at SHH, chr7:155,799,529..155,812,871"
    >
      <LinearGenomeView
        assembly={{
          name: 'hg38',
          uri: 'https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz',
          refNameAliases: {
            uri: 'https://jbrowse.org/genomes/GRCh38/hg38_aliases.txt',
          },
        }}
        tracks={[
          {
            trackId: 'hg38-ncbi-refseq-curated',
            name: 'NCBI RefSeq Curated',
            uri: 'https://jbrowse.org/ucsc/hg38/ncbiRefSeqCurated.gff.gz',
            csi: true,
          },
        ]}
        view={{
          loc: 'chr7:155,799,529..155,812,871',
          tracks: ['hg38-ncbi-refseq-curated'],
        }}
      />
    </PosterFirst>
  )
}