|
1 | 1 | 
|
2 | 2 |
|
3 |
| -# jbrowse-plugin-my-project |
| 3 | +# jbrowse-plugin-quantseq |
4 | 4 |
|
5 |
| -> Template to quickly start a new JBrowse plugin |
| 5 | +This is an external plugin for the [JBrowse 2](https://jbrowse.org/jb2/) |
| 6 | +open-source platform for visualizing and integrating biological data. |
| 7 | +This plugin implements a QuantitativeSequence (quantseq) track type. It builds on the concept of a "dynamic sequence (dynseq)" track that was added to the |
| 8 | +awesome [WashU Epigenome Browser](http://epigenomegateway.wustl.edu/). |
6 | 9 |
|
7 |
| -## Usage |
| 10 | +This track combines the QuantitativeTrack and the ReferenceSequenceTrack from |
| 11 | +JBrowse 2 in order to visualize quantitative data for regulatory genomics at |
| 12 | +base-resolution, such as the predictions of the [BPNet](https://github.com/kundajelab/bpnet) model. Here is what this new track looks like: |
8 | 13 |
|
9 |
| -You can use this template to create a new GitHub repository or a new local |
10 |
| -project. |
11 | 14 |
|
12 |
| -### Software requirements |
| 15 | +## Contributing |
13 | 16 |
|
14 |
| -- [git](https://git-scm.com/downloads) |
15 |
| -- [Node.js](https://nodejs.org/en/download/) (version 10 or greater) |
16 |
| -- [yarn](https://yarnpkg.com/en/docs/install) (or npm which comes with Node.js) |
17 |
| - |
18 |
| -### Create a new project from this template |
19 |
| - |
20 |
| -You can click the "Use this template" button in the repository (instructions |
21 |
| -[here](https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template)): |
22 |
| - |
23 |
| - |
24 |
| - |
25 |
| -Or you can use the GitHub CLI: |
26 |
| - |
27 |
| -```console |
28 |
| -$ gh repo create jbrowse-plugin-my-project --template https://github.com/GMOD/jbrowse-plugin-template.git |
29 |
| -``` |
30 |
| - |
31 |
| -Or you can start a plugin locally: |
32 |
| - |
33 |
| -```console |
34 |
| -$ git clone https://github.com/GMOD/jbrowse-plugin-template.git jbrowse-plugin-my-project |
35 |
| -$ cd jbrowse-plugin-my-project |
36 |
| -$ rm -rf .git |
37 |
| -$ # If you want to use Git, re-initialize it |
38 |
| -$ git init |
39 |
| -``` |
40 |
| - |
41 |
| -## Getting started |
42 |
| - |
43 |
| -### Setup |
44 |
| - |
45 |
| -Run `yarn init` (or `npm init`) and answer the prompts to fill out the |
46 |
| -information for your plugin |
47 |
| - |
48 |
| -- Make sure you at least enter a "name" (probably starting with |
49 |
| - "jbrowse-plugin-", or "@myscope/jbrowse-plugin-" if you're going to publish to |
50 |
| - an NPM organization) |
51 |
| -- Other fields may be left blank |
52 |
| -- leave the "entry point" as `dist/index.js` |
53 |
| - |
54 |
| -Now run `yarn` (or `rm yarn.lock && npm install` to use npm instead of yarn) to install the necessary dependencies. |
55 |
| - |
56 |
| -After this, run `yarn setup` (or `npm run setup`). |
57 |
| -This configures your project, and adds a build of JBrowse 2 that can be used to test your plugin during development. |
58 |
| - |
59 |
| -### Build |
60 |
| - |
61 |
| -```console |
62 |
| -$ yarn build ## or `npm run build` |
63 |
| -``` |
64 |
| - |
65 |
| -### Development |
66 |
| - |
67 |
| -To develop against JBrowse Web: |
68 |
| - |
69 |
| -- Start a development version of JBrowse Web (see |
70 |
| - [here](https://github.com/GMOD/jbrowse-components/blob/master/CONTRIBUTING.md)) |
71 |
| -- In this project, run `yarn start` (or `npm run start`) |
72 |
| -- Assuming JBrowse Web is being served on port 3000, navigate in your web |
73 |
| - browser to |
74 |
| - http://localhost:3000/?config=http://localhost:9000/jbrowse_config.json |
75 |
| -- When you make changes to your plugin, it will automatically be re-built. |
76 |
| - You can then refresh JBrowse Web to see the changes. |
77 |
| - |
78 |
| -### Testing |
79 |
| - |
80 |
| -To test your plugin, there are several commands available: |
81 |
| - |
82 |
| -#### `yarn browse` or `npm run browse` |
83 |
| - |
84 |
| -Launches your local JBrowse 2 build that is used for integration testing, with your |
85 |
| -plugin already included in the configuration. Your plugin must also be running |
86 |
| -(`yarn start` or `npm run start`). |
87 |
| - |
88 |
| -#### `yarn test` or `npm test` |
89 |
| - |
90 |
| -Runs any unit tests defined during plugin development. |
91 |
| - |
92 |
| -#### `yarn test:cy` or `npm run test:cy` |
93 |
| - |
94 |
| -Runs the [cypress](https://www.cypress.io/) integration tests for your plugin. |
95 |
| -Both the plugin and `browse` must already be running. |
96 |
| - |
97 |
| -#### `yarn e2e` or `npm run e2e` |
98 |
| - |
99 |
| -Starts up the JBrowse 2 build as well as your plugin, and runs the [cypress](https://www.cypress.io/) |
100 |
| -integration tests against them. Closes both resources after tests finish. |
101 |
| - |
102 |
| -#### `yarn cypress` or `npm run cypress` |
103 |
| - |
104 |
| -Launches the [cypress](https://www.cypress.io/) test runner, which can be very |
105 |
| -useful for writing integration tests for your plugin. Both the plugin and `browse` |
106 |
| -must already be running. |
107 |
| - |
108 |
| -#### Github Action |
109 |
| - |
110 |
| -This template includes a [Github action](https://github.com/features/actions) that |
111 |
| -runs your integration tests when you push new changes to your repository. |
112 |
| - |
113 |
| -### Publishing |
114 |
| - |
115 |
| -Once you have developed your plugin, you can publish it to NPM. Remember to |
116 |
| -remove `"private": true` from `package.json` before doing so. |
117 |
| - |
118 |
| -If you are using `@jbrowse/react-linear-genome-view`, you can install the plugin |
119 |
| -from NPM and use it there. If you are using JBrowse Web, after the plugin is |
120 |
| -published to NPM, you can use [unpkg](https://unpkg.com/) to host plugin bundle. |
121 |
| -A JBrowse Web config using this plugin would look like this: |
122 |
| - |
123 |
| -```json |
124 |
| -{ |
125 |
| - "plugins": [ |
126 |
| - { |
127 |
| - "name": "MyProject", |
128 |
| - "url": "https://unpkg.com/jbrowse-plugin-my-project/dist/jbrowse-plugin-my-project.umd.production.min.js" |
129 |
| - } |
130 |
| - ] |
131 |
| -} |
132 |
| -``` |
133 |
| - |
134 |
| -You can also use a specific version in unpkg, such as |
135 |
| -`https://unpkg.com/[email protected]/dist/jbrowse-plugin-my-project.umd.production.min.js` |
136 |
| - |
137 |
| -### TypeScript vs. JavaScript |
138 |
| - |
139 |
| -This template is set up in such a way that you can use both TypeScript and |
140 |
| -JavaScript for development. If using only JavaScript, you can change |
141 |
| -`src/index.ts` to `src/index.js`. If using only TypeScript, you can remove |
142 |
| -`"allowJs": true` from `tsconfig.json` and `"@babel/preset-react"` from |
143 |
| -`.babelrc` (and from "devDependencies" in `package.json`). |
| 17 | +We welcome an contributions or PRs to this repo. Developer information for this |
| 18 | +codebase can be found [here](https://github.com/elliothershberg/jbrowse-plugin-quantseq/CONTRIBUTING.md) |
0 commit comments