jbrowse-plugin-gdc
TypeScript icon, indicating that this package has built-in type declarations

2.3.1 • Public • Published

jbrowse-plugin-gdc

JBrowse 2 plugin for the NCI Genomic Data Commons (GDC)

Install

For use in JBrowse Web

No installation required

For use in @jbrowse/react-linear-view

yarn add jbrowse-plugin-gdc

Usage

In JBrowse Web

Development

git clone https://github.com/GMOD/jbrowse-plugin-gdc.git
cd jbrowse-plugin-gdc
yarn
yarn start

Then open JBrowse Web to (assuming it is running on port 3000):

http://localhost:3000/?config=http://localhost:9000/config.json

Demo

https://s3.amazonaws.com/jbrowse.org/code/jb2/main/index.html?config=https%3A%2F%2Funpkg.com%2Fjbrowse-plugin-gdc%2Fdist%2Fconfig.json

Production

Add to the "plugins" of your JBrowse Web config:

{
  "plugins": [
    {
      "name": "GDC",
      "url": "https://unpkg.com/jbrowse-plugin-gdc/dist/jbrowse-plugin-gdc.umd.production.min.js"
    }
  ]
}

You must manually add to the "internetAccounts" of your JBrowse Web config, and run locally to access controlled resources:

  "internetAccounts": [
    {
      "type": "GDCInternetAccount",
      "internetAccountId": "GDCExternalToken",
      "name": "GDC",
      "description": "GDC External Token",
      "domains": ["portal.gdc.cancer.gov", "api.gdc.cancer.gov"],
      "customEndpoint": "http://localhost:8010/proxy"
    }
  ],

In @jbrowse/react-linear-view

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

const theme = createJBrowseTheme()

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

Screenshot

Readme

Keywords

Package Sidebar

Install

npm i jbrowse-plugin-gdc

Weekly Downloads

12

Version

2.3.1

License

MIT

Unpacked Size

13.9 MB

Total Files

194

Last publish

Collaborators

  • cmdcolin
  • garrettjstevens
  • carolinebridge