Skip to content

GMOD/jbrowse-plugin-gdc

Repository files navigation

jbrowse-plugin-gdc

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

Install

For use in JBrowse Web

No installation required

yarn add jbrowse-plugin-gdc

Usage

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"
    }
  ],
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