JBrowse 2 plugin for the NCI Genomic Data Commons (GDC)
For use in JBrowse Web
No installation required
For use in @jbrowse/react-linear-view
yarn add jbrowse-plugin-gdc
In JBrowse Web
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
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>
)
}