Mercurial > repos > iuc > jbrowse2
comparison README.md @ 0:61add3f58f26 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 4fa86613193c985e0cb9a8fc795c56b8bc7b8532
| author | iuc |
|---|---|
| date | Thu, 02 Oct 2025 10:19:44 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:61add3f58f26 |
|---|---|
| 1 # JBrowse2 in Galaxy | |
| 2 | |
| 3 JBrowse is a fast, embeddable genome browser built completely with | |
| 4 JavaScript and HTML5 | |
| 5 | |
| 6 Thus, it makes an ideal fit with Galaxy, especially for use as a | |
| 7 workflow summary. E.g. annotate a genome, then visualise all of the | |
| 8 associated datasets as an interactive HTML page. This tool MUST be added | |
| 9 to the "HTML Rendered" allow list in the Galaxy admin panel to function correctly. | |
| 10 | |
| 11 ## Installation | |
| 12 | |
| 13 It is recommended to install this wrapper via the Galaxy Tool Shed. | |
| 14 | |
| 15 ## Running Locally | |
| 16 | |
| 17 The Galaxy tool interface writes out a xml file which is then used to generate | |
| 18 the visualizations. An example used during development/testing can be seen in | |
| 19 `test-data/*/test.xml`. The format is in no way rigorously defined and is | |
| 20 likely to change at any time! Beware. ;) | |
| 21 | |
| 22 ## Testing with Planemo | |
| 23 | |
| 24 The tool comes with standard tests that can be run with `planemo run`. | |
| 25 | |
| 26 If you want to make manual tests with `planemo serve`, it is a bit more complex. | |
| 27 If you do it, you will notice that you cannot see any tool output. That's because JBrowse2 needs to be served | |
| 28 by a HTTP server supporting byte-range requests. Planemo does not by default. | |
| 29 | |
| 30 Here comes a hacky solution, that works (but is a bit ugly, sorry). | |
| 31 | |
| 32 First you need to start a Nginx server that will act as a proxy to the local Galaxy server launched by `planemo serve`. This can be done easily with a docker-compose.yml file like this: | |
| 33 | |
| 34 ```yaml | |
| 35 services: | |
| 36 | |
| 37 proxy: | |
| 38 image: quay.io/abretaud/nginx-ldap:latest # This a basic Nginx image, any other classic Nginx image should work | |
| 39 volumes: | |
| 40 - "./nginx/conf:/etc/nginx/conf.d" | |
| 41 - "/tmp/:/tmp/:ro" | |
| 42 network_mode: "host" | |
| 43 ``` | |
| 44 | |
| 45 And the mounted `nginx.conf` file: | |
| 46 | |
| 47 ```text | |
| 48 server { | |
| 49 listen 80; | |
| 50 server_name ~.; | |
| 51 | |
| 52 location /_x_accel_redirect/ { | |
| 53 internal; | |
| 54 alias /; | |
| 55 } | |
| 56 | |
| 57 location / { | |
| 58 client_max_body_size 50g; | |
| 59 add_header Accept-Ranges bytes; | |
| 60 proxy_redirect http://localhost:9090/ http://$host; | |
| 61 proxy_pass http://localhost:9090/; | |
| 62 proxy_force_ranges on; | |
| 63 proxy_pass_request_headers on; | |
| 64 } | |
| 65 } | |
| 66 ``` | |
| 67 | |
| 68 Launch it with `docker compose up -d`. | |
| 69 | |
| 70 Then you need to make a small modification of Planemo's code (do it in a dedicated virtualenv), supposing you have installed it in `~/venvs/planemo`, edit `~/venvs/planemo/lib/python*/site-packages/planemo/galaxy/config.py`: | |
| 71 | |
| 72 In the `local_galaxy_config` function around line 422, in the `properties.update(...)` call, add this line: | |
| 73 | |
| 74 `nginx_x_accel_redirect_base="/_x_accel_redirect",` | |
| 75 | |
| 76 Now run `planemo serve`, and then run a `chmod a+rx /tmp/tmpxxxx`, where `/tmp/tmpxxxx` is the directory where Planemo is running Galaxy from. | |
| 77 | |
| 78 Now you can access your Planemo Galaxy instance at 2 adresses: | |
| 79 | |
| 80 - http://localhost:9090/ : the usual Planemo address, file uploads will work, but you can't access JBrowse2 tool output | |
| 81 - http://localhost:80/ : the same Galaxy server where you *can* access JBrowse2 tool output (don't forget to add the tool in the "HTML Rendered" allow list in the admin panel) | |
| 82 | |
| 83 ## TODO list | |
| 84 | |
| 85 - Support more display options (bug: https://github.com/GMOD/jbrowse-components/issues/5148) | |
| 86 - Reimplement auto coloring of features (custom plugin like https://jbrowse.org/jb2/docs/config_guides/customizing_feature_colors/ ?) | |
| 87 - Support more plugins from https://jbrowse.org/jb2/plugin_store/ | |
| 88 - Support Circular view | |
| 89 - Support SV inspector/spreadsheet views | |
| 90 - Investigate using CSI indexing instead of TBI for large chromosomes (https://github.com/GMOD/jbrowse-components/issues/4565#issuecomment-2361153737) | |
| 91 - Synteny: add support for .out (MashMap) .chain (UCSC), .delta (mummer) and .anchors (mcscan) inputs |
