Wondering what’s next for npm?Check out our public roadmap! »

@jbrowse/react-linear-genome-viewTypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

@jbrowse/react-linear-genome-view

JBrowse 2 linear genome view React component

JBrowse 2 is a pluggable open-source platform for visualizing and integrating biological data. This component consists of a single linear view of the same type exists in the full JBrowse 2 application.

Usage

import React from 'react'
import 'fontsource-roboto'
import {
  createViewState,
  createJBrowseTheme,
  JBrowseLinearGenomeView,
  ThemeProvider,
} from '@jbrowse/react-linear-view'

const theme = createJBrowseTheme()

function View() {
  const state = createViewState({
    assembly: {
      /* assembly */
    },
    tracks: [
      /* tracks */
    ],
  })
  return (
    <ThemeProvider theme={theme}>
      <JBrowseLinearGenomeView viewState={state} />
    </ThemeProvider>
  )
}

For a full working example, see this example.

Install

With yarn:

$ yarn add @jbrowse/react-linear-genome-view

Or with npm:

$ npm install @jbrowse/react-linear-genome-view

Note on fonts

Roboto is the recommended font for JBrowse, and this component will use that font if it is available. The easiest way to add it is to add the fontsource-roboto package to your project and import it in your root index.js.

Academic Use

This package was written with funding from the NHGRI as part of the JBrowse project. If you use it in an academic project that you publish, please cite the most recent JBrowse paper, which will be linked from jbrowse.org.

License

MIT

Install

npm i @jbrowse/react-linear-genome-view

DownloadsWeekly Downloads

29

Version

1.0.3

License

MIT

Unpacked Size

717 kB

Total Files

41

Homepage

jbrowse.org

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar