Integrate a Genome Browser into a Java application
2
2
Entering edit mode
9.4 years ago

Hello,

this is my first post here. I would like to know if there is a way to call IGB (Integrated Genome Browser) through Java. I want to start a specific instance of IGB from a Java application and automatically show some tracks of interest that are on local file. Is this possible? Is there a way to use IGB into a Java application? or at least is there a way to use a whatever genome browser like that?

Thanks in advance

igb java genome-browser • 2.7k views
ADD COMMENT
4
Entering edit mode
9.4 years ago
Ann ★ 2.4k

Hi,

Thank you for the great question!

Here are some additional possibilities that may be a good fit for what you want to do.

Option One: Use IGB links (probably the simplest) - port 7085

One option is to use ports on localhost, as IGB "listens" to port 7085 on localhost and can respond to commands encoded in a URL.

Here is some documentation about this to get you started:

Option Two: Use IGB commands - port 7084

Starting with IGB 8.2 (release next week!) you can control IGB by sending commands directly to port 7084.

We implemented this to enable controlling IGB from within an interactive R session, but you could use this same mechanism to control IGB from other applications implemented in other languages.

To see how the R code looks, look at SRAdb/IGBFunctions.Rmd in https://bitbucket.org/lorainelab/rtoigb

Note that this is based on similar functionality in Bioconductor package SRAdb, hence the name.

Option Three: OSGi services (requires Java coding)

Possibly another option would be to use IGB's OSGi plug-in architecture to hook directly into IGB functions that are exposed as OSGi services. That would require more coding -- but if you wanted to invest the time, you could probably do some very nice stuff.

To find out more about how to work with IGB as a developer, see the developer's guide:

https://wiki.transvar.org/display/igbdevelopers/Home

Thank you again for your great question. I will post again here as we make more demonstration code available.

Yours,
Ann

ADD COMMENT
0
Entering edit mode

Hi Ann,

It is a real pleasure to have the possibility to talk to you. I have no problems coding in Java (computer engineering is actually my major), but a plugin doesn't look like the best possible solution. Actually I haven't had the possibility to examine this solution deeply. However, I will try to evaluate the three options you posted and see if I can obtain what I need. I will let you know. If there is a way to communicate directly through email, it would be really helpful for my research.

Thanks again,
Piero

ADD REPLY
0
Entering edit mode

Thank you so much for the kind words. You are very welcome to email me directly via aloraine@uncc.edu.

ADD REPLY
0
Entering edit mode

Hi Ann,

I add this here as well so that if someone else is interested can see the developing of the discussion.

I examined the options you wrote me about and I came to the following conclusions:

  • OSGi services: I think this solution is not feasible for my problem. What I am trying to do is not to add a service on top of the IGB Genome Browser. My idea is to use some of the functionalities of IGB inside another application. Probably the other two solutions are the best options.
  • Option Two: Use IGB links - port 7085: I have tried this solution and it works fine. But it has a limitation I haven't found a way to overcome: once you have load a track you cannot delete it or at least hide it through the script language. Am I correct? In my idea I want to provide the user with the ability of changing the visualized tracks without starting a new instance of the genome browser. Summarizing, I would need a "unload" or "delete" command that so far is not available.
  • Option Three: Use IGB commands - port 7084: this can be the perfect solution. To send commands to IGB inside my application. It won't be a R application, but that shouldn't change the attuability of this solution. Am I correct? I am looking forward for the release of version 8.2.

Please correct me, if I made some mistakes in my analysis. I am really glad for your help and, if you are interested, I am more than available to explain what we are working on.

Thanks,
Piero

ADD REPLY
2
Entering edit mode
9.4 years ago
dcnorris ▴ 270

Hi Pierre,

You should take a look at the http://bioviz.org/igb/jnlpService.html to see if it could meet your needs. This custom jnlp generator would allow you to launch IGB and automatically load a bookmark (containing all tracks you are interested in loading), or even run a custom igb script to drive even more complex actions in IGB (See http://wiki.transvar.org/display/igbman/Scripting+and+the+IGB+command+language). From another java program you cannot launch IGB without going through a web browser, but you could absolutely hook into the scripting endpoint in a running IGB instance and pass commands from another java tool.

If you want to explain your vision further I will try to offer further advice.

Best Regards!

P.S. you should note IGB 8.2 is an option in the jnlp generator service, but should not be used since it is not yet released.

ADD COMMENT
0
Entering edit mode

Hello

The IGB JNLP Generator Service cannot be useful. I'll try to explain a little better my problem. I have a software that produces some results in .gft or .bed formats (some of the typical formats of genome browsers). When this software produce there results, I want to give the user the opportunity to select one of them and visualize it directly on the genome browser. It would be good enough to pass commands from another java application. For example, my idea is to produce an GUI in which the user can select one of the K results and have it visualized on the IGB Genome Browser. Do you have any idea of how to do it?

ADD REPLY

Login before adding your answer.

Traffic: 1454 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6