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
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:

 - https://wiki.transvar.org/display/igbman/Controlling+IGB+using+IGB+Links
 - https://wiki.transvar.org/display/igbman/Scripting+and+the+IGB+command+language

**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