This plugin adapts the UCSC API
For use in JBrowse Web
No installation required
For use in @jbrowse/react-linear-view
yarn add jbrowse-plugin-ucsc
In JBrowse Web
git clone https://github.com/cmdcolin/jbrowse-plugin-ucsc-api.git
cd jbrowse-plugin-ucsc-api
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": "UCSC",
"url": "https://unpkg.com/jbrowse-plugin-ucsc/dist/jbrowse-plugin-ucsc.umd.production.min.js"
}
]
}
import React from "react";
import "fontsource-roboto";
import {
createViewState,
createJBrowseTheme,
JBrowseLinearGenomeView,
ThemeProvider,
} from "@jbrowse/react-linear-view";
import UCSC from "jbrowse-plugin-ucsc";
const theme = createJBrowseTheme();
function View() {
const state = createViewState({
assembly: {
/* assembly */
},
tracks: [
/* tracks */
],
plugins: [UCSC],
});
return (
<ThemeProvider theme={theme}>
<JBrowseLinearGenomeView viewState={state} />
</ThemeProvider>
);
}