Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add Support for GenBank Format Download to Facilitate Non-Professional Users #4063

Closed
lybCNU opened this issue Nov 16, 2023 · 9 comments
Labels
enhancement New feature or request

Comments

@lybCNU
Copy link

lybCNU commented Nov 16, 2023

Hello JBrowse2 development team,

I have encountered an issue with JBrowse2: it currently seems to be unable to support downloading files in GenBank format. In particular, I am in need of the join feature in GenBank files, which is crucial for describing gene structures that span multiple non-contiguous regions.

I would like JBrowse2 to add support for downloading files in GenBank format, making it more accessible for users without a programming background. This support should include the ability to handle join statements, accurately reflecting complex gene structures.

The current alternative involves downloading the sequence and then manually adding features using SnapGene or other software. However, this process becomes particularly cumbersome when dealing with gene structures that span multiple non-contiguous regions. Not only is it time-consuming, but it also requires a level of expertise with these software tools that many users, especially those without a programming background, may not possess.

The addition of this feature would greatly enhance the appeal of JBrowse2 within the bioinformatics community, especially for non-professional users seeking straightforward solutions.

@lybCNU lybCNU added the enhancement New feature or request label Nov 16, 2023
@cmdcolin
Copy link
Collaborator

hi there,
thanks for this request. We actually have an open PR for a "Save track data" type feature with GenBank file format output. the current progress is in this PR:

#3439

I know @scottcain has been trying out this branch for users on wormbase

It has been in the works for a long time, but I think that it is getting closer to ready!

@scottcain
Copy link
Member

For a few WormBase releases, I've held back the save track data functionality from the production version (since the functionality hasn't been part of an official JBrowse 2 release) but with WS290, released about a month ago, the JBrowse version that is running on WormBase proper (as opposed to just the staging site) has the save track data option. See for example:

https://wormbase.org/tools/genome/jbrowse2/?session=share-fNO7Q3m5rP&password=VU5n1

and click on the vertical ... on the track label and select "save track data" from the context menu.

@lybCNU
Copy link
Author

lybCNU commented Nov 17, 2023

Hello @cmdcolin and @scottcain ,

Thank you for your prompt responses. I am greatly appreciative of the progress with the "Save track data" feature in JBrowse 2. Through your efforts, our laboratory has successfully adopted the GenBank download functionality on WormBase, which has proven to be incredibly useful and a significant aid in our work.

However, we also handle datasets that are not featured on WormBase. This presents a unique challenge, as we need to provide access to these datasets for non-professional users, who are our primary focus in certain projects.

In trying to implement the advancements from PR #3439, I have encountered several technical difficulties. Despite my best efforts, I keep running into errors that are beyond my technical expertise to resolve. I would greatly appreciate a more user-friendly option, such as a Conda package or a Docker image, which would make it more accessible for users like myself.

Could you advise on the availability of such options, or suggest other convenient installation methods that could cater to users with less technical background?

Thank you for your consideration and looking forward to the further development of this feature.

@scottcain
Copy link
Member

Hi @lybCNU , Unfortunately, at the moment, I don't have the bandwidth to create a generic use JBrowse 2 docker image, but such a thing would be nice to have. Can I ask what are the nature of the problems you are running into: are they related to configuring/running a web server, installing JBrowse 2 with the jbrowse-cli, or configuring JBrowse 2 (creating a config.json), or something else entirely?

@lybCNU
Copy link
Author

lybCNU commented Nov 17, 2023

Hi, @scottcain

I'm not sure if I understand the installation process correctly. As per my understanding, I downloaded the jbrowse-components-save_track_data.zip file from save_track_data branch because git always not work well in China and then I setup the Pre-requisites.

When try to install nodejs18 on our lab server, I got this.
`yum install https://rpm.nodesource.com/pub_18.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm -y

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

nodesource-release-nodistro-1.noarch.rpm | 10 kB 00:00:00
Examining /var/tmp/yum-root-84KjDI/nodesource-release-nodistro-1.noarch.rpm: nodesource-release-nodistro-1.noarch
Marking /var/tmp/yum-root-84KjDI/nodesource-release-nodistro-1.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package nodesource-release.noarch 0:nodistro-1 will be installed
--> Processing Dependency: glibc >= 2.28 for package: nodesource-release-nodistro-1.noarch
--> Finished Dependency Resolution
Error: Package: nodesource-release-nodistro-1.noarch (/nodesource-release-nodistro-1.noarch)
Requires: glibc >= 2.28
Installed: glibc-2.17-323.el7_9.i686 (@updates)
glibc = 2.17-323.el7_9
Available: glibc-2.17-317.el7.i686 (base)
glibc = 2.17-317.el7
Available: glibc-2.17-322.el7_9.i686 (updates)
glibc = 2.17-322.el7_9
Available: glibc-2.17-324.el7_9.i686 (updates)
glibc = 2.17-324.el7_9
Available: glibc-2.17-325.el7_9.i686 (updates)
glibc = 2.17-325.el7_9
Available: glibc-2.17-326.el7_9.i686 (updates)
glibc = 2.17-326.el7_9
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest`

I don't want to modify the glibc of our lab server. Instead I installed nodejs and yarn with conda. But I don't known how to install libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev with conda. Through this install way, the error message below:
`yarn

yarn install v1.22.21

warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "workspace-aggregator-d38b7ebd-296d-4bf9-b6d7-c0142b175a8c > @jbrowse/plugin-arc > [email protected]" has incorrect peer dependency "react@^16.3.0".
warning "workspace-aggregator-d38b7ebd-296d-4bf9-b6d7-c0142b175a8c > @jbrowse/plugin-arc > [email protected]" has incorrect peer dependency "react-dom@^16.3.0".
[4/4] Building fresh packages...
[-/7] ⠂ waiting...
[-/7] ⠂ waiting...
[-/7] ⠂ waiting...
[4/7] ⠂ canvas
error /home/www/html/jbrowse-web/jbrowse-components-save_track_data/node_modules/electron: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: /home/www/html/jbrowse-web/jbrowse-components-save_track_data/node_modules/electron
Output:
RequestError: read ETIMEDOUT
at ClientRequest. (/home/www/html/jbrowse-web/jbrowse-components-save_track_data/node_modules/got/dist/source/core/index.js:970:111)
at Object.onceWrapper (node:events:628:26)
at ClientRequest.emit (node:events:525:35)
at origin.emit (/home/www/html/jbrowse-web/jbrowse-components-save_track_data/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
at TLSSocket.socketErrorListener (node:_http_client:502:9)
at TLSSocket.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
`

Then, I tried install to install jbrowse-components-save_track_data.zip in a ubuntu docker. I installed the Pre-requisites in the ubuntu docker and yarn. I got error message:
`yarn

yarn install v1.22.19

[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "workspace-aggregator-ed196b37-1316-432d-b113-74270789489d > @jbrowse/plugin-arc > [email protected]" has incorrect peer dependency "react@^16.3.0".
warning "workspace-aggregator-ed196b37-1316-432d-b113-74270789489d > @jbrowse/plugin-arc > [email protected]" has incorrect peer dependency "react-dom@^16.3.0".
[4/4] Building fresh packages...
[-/7] ⠠ waiting...
[-/7] ⠠ waiting...
[-/7] ⠠ waiting...
[4/7] ⠠ canvas
error /jbrowse-components-save_track_data/node_modules/electron: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: /jbrowse-components-save_track_data/node_modules/electron
Output:
RequestError: getaddrinfo ENOTFOUND github.com
at ClientRequest. (/jbrowse-components-save_track_data/node_modules/got/dist/source/core/index.js:970:111)
at Object.onceWrapper (node:events:629:26)
at ClientRequest.emit (node:events:526:35)
at origin.emit (/jbrowse-components-save_track_data/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
at TLSSocket.socketErrorListener (node:_http_client:495:9)
at TLSSocket.emit (node:events:514:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
`

I can install the jbrowse2 with conda. Is that possible to add the save_track_data buttom to the conda based jbrowse2?
Is there an easier way to complete the configuration?

@cmdcolin
Copy link
Collaborator

cmdcolin commented Nov 18, 2023

@lybCNU I can see the route you've taken, I think you made some good steps but there are alternate ways of doing this

I'm just going to summarize the steps you took, and then say why they may not lead to the right outcome, and then provide a potential alternative path

  1. You installed Node from NodeSource. This is generally a good approach, but you said it needed a modified glibc, which is also valid, so you installed nodejs from another source (conda). I have not done this personally, but it sounds like it should be fine
  2. You said "Then, I tried install to install jbrowse-components-save_track_data.zip in a ubuntu docker". I think this may be where it gets a bit tricky. I imagine jbrowse-components-save_track_data.zip is the raw source code of our repository on that branch. However, we have pre-built versions of jbrowse web (the web version of JBrowse 2) that you can install without downloading the raw source code
  3. You then mention trying to install "libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev". These are not necessary with the pre-built versions of jbrowse, and are only necessary for running tests. Our README for this repo should make this more clear. They are just for simulating a javascript canvas during our tests, so you do not need them for most purposes except for dev environments
  4. You mention running yarn, and then it tries to download our (many!) dependencies and it got stuck maybe on the electron download or something, however, this is similar to the above: if you use our pre-built version, you will not need this

All of that to say, you can use our pre-built version of jbrowse web for this branch without going through all those steps!

You can run

jbrowse create --branch save_track_data output_dir

and it will download the latest version of jbrowse-web, from that beta branch save_track_data

Then, you can put output_dir in your web server directory e.g. /var/www/html/ and access it like http://localhost/output_dir

This way, all you need to do is install the jbrowse CLI tool (npm install -g @jbrowse/cli). Hopefully that works using the conda nodejs environment you have. If not, we can try to go from there!

We don't have any default docker or conda tooling for jbrowse 2, but the pre-built instructions don't require too advanced of a dev environment so I hope that helps!

@lybCNU
Copy link
Author

lybCNU commented Nov 19, 2023

Hi, @cmdcolin I am writing to express my sincere gratitude for your guidance and support. Following your latest advice, I am thrilled to report that I have successfully implemented the functionality we needed in JBrowse 2. Thank you very much for your exceptional support.

@lybCNU lybCNU closed this as completed Nov 20, 2023
@cmdcolin
Copy link
Collaborator

@lybCNU thanks for the kind words. I just wanted to add, the genbank format is quite tricky, so i just tried my best to make it work. even downloaded a trial of snapgene, but my trial ran out at this point! if you spot anything wrong with it, or anything that can be improved, let us know

@lybCNU
Copy link
Author

lybCNU commented Nov 20, 2023

Hi @cmdcolin
Thank you for your message and for all the effort you've put into making the GenBank format work in JBrowse 2. I wanted to reassure you that the current implementation of the GenBank format in JBrowse 2 is quite sufficient for our needs. Although the lack of sequence line-wrapping in JBrowse 2's GenBank implementation which is due to my initial submission at wormbase forum, I believe this is not a significant issue in the current computer era. Also, a special thanks to @scottcain who initially responded to my request on the WormBase forum.

Furthermore, I would like to recommend the APE (A Plasmid Editor) tool, another excellent FREE resource for testing and visualizing GenBank files. It is also widely used in many laboratories and could be beneficial for further testing and refinements of the GenBank format in JBrowse 2.

Thank you again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants