After looking at the source code for both VARNA and Jalview, I feel like I’m not quite familiar with all of the parts of Jalview to make a good decision on whether VARNA can be embedded into Jalview.
Ok. I’ve started looking at it myself to check things out.
We can talk about this more at our meeting.
Things I’d like to go over are below.
I’ve added some comments to each point - we’ll still have plenty to discuss at the meeting, too.
I also looked at the Stockholm parser, and I don’t think I need to change anything. I think the only thing that I need to do to complete Goal 1 is to add the .sto as a supported file extension in the AppletFormatAdapter class in the jalview.io package. I noticed that in this file there is .sth as an extension for stockholm files…I’ll just keep it in there.
We can talk about this at the meeting - there are a couple of subtleties with the various FormatAdapters - but its pretty straightforward, as you say.
Whenever I’ve worked with stockholm files I use the .sto extension, so we’ll have both as options. I just want to make it more obvious that stockholm files are supported when you try to open an alignment file. I’ll need to change things like READABLE_EXTENSIONS and READABLE_FNAMES in AppleFormatAdapter also.
These are the subtleties: Jalview has two sets of file format and file format extension lists - one for the ones it can read, and the others for those that it can write. Since Stockholm files can’t be written (yet…) - you shouldn’t add stockholm to the writable format lists. You can try it, of course, to see what happens to the ‘save as’ dialog box and output to text box submenu.
To complete Goal 2 I will need to modify SequenceFeature to support RNA secondary structure features. If we have time at the meeting I can discuss this.
I think this is a high priority. If you can, try to think about the ways in which this class needs changing.
- How do you look at the source code of a jar file in Eclipse? I tried to download a plugin (JAD) , but I couldn’t get it to work. I ended up just using the jar command in a unix shell to extract the varna code.
There are a couple of ‘archive viewer’ plugins, but in the case of the VARNA source, you don’t need any - particularly since the archive actually contains an eclipse project. Here’s how to import it and get it running:
- Open the ‘File->Import…’ dialog.
- Choose the ‘Existing projects into workspace’ entry under the ‘General’ tab.
- Select import from archive, and locate the VARNA source archive.
- Check the VARNA3-1 project and hit the import button!
You’ll notice that the project is set up a little differently to the Jalview one (there’s no source directory, or lib directory, for instance) - this isn’t a problem, but its worth remembering that this is the case when you come to package a VARNA jar for Jalview.
The next steps are necessary to get the Java references set up correctly, since you’ll have a different version of Java on your system to the one that the archive was exported from.
- a. Right click the new project (VARNA3-1 probably), and select the ‘configure build path’ option under the ‘Build path’ menu.
5.b. fix up the broken reference to the JDK in the ‘Libraries’ tab - select the entry with an ‘x’ and hit edit, then pick the JDK which you have on your system (probably java 1.6).
5.c. Select the ‘source folders’ tab, and select the ‘src’ folder and remove it from the list.
5.d. hit the ‘Add folder’ button and select the project’s root directory as a source folder to add to the path.
- e. Check the 'allow output folders for source folders
- f. Change the default output directory from VARNA3-1/bin to VARNA3-1/
- hit ok, and the project should rebuild itself with the new settings, with any luck you’ll have no errors.
After this, you should be able to run VARNA by locating the fr.orsay.lri.varna.applications.VARNAGUI class and using the ‘Run as … application’ menu entry.
- What do you think of Yann’s comments about VarnaPanel being “selfish”? Should we ask him if he can implement a few features for us?
I’ll leave that to the meeting. The short answer is ‘maybe’. He sounds like he’s quite busy, but once we work out what needs to be changed in VARNA, we can talk to him before we go away and hack the code ourselves. Ideally, programmers like to have an example that they can use to develop against - we should provide him with an example code fragment where VARNA needs to do something (e.g. be initialised with a sequence + secondary structure within an existing JPanel or JFrame), and he’ll be able to fix up the methods quickly to do this.
- I tried to launch VARNA from Eclipse, but I’m getting funny errors about the Java library access. Perhaps you can help me with this. I don’t know if it’s necessary at this point to do this.
it is! Its really important you can get things running, not least because it’ll make you feel like you’ve achieved something
- I think that everything we need is in VARNAPanel. There are a few different constructors which I think fit what we’d want.
Ok. We can look at those during the meeting.
I did see the post on embedding Jalview. I know that the Clustal and Rfam websites can launch Jalview for sequences that you’ve selected…would this help that person at all? I’m guessing that it won’t be much help since it’s a website versus an application.
you’re right - what the person was asking about was exactly what we are going to ask Yann about! In that case, the person was asking how he can open a Jalview alignFrame as a panel within his own swing application.
Talk to you later!
-- ------------------------------------------------------------------- J. B. Procter (JALVIEW/ENFIN) Barton Bioinformatics Research Group Phone/Fax:+44(0)1382 388734/345764 [http://www.compbio.dundee.ac.uk](http://www.compbio.dundee.ac.uk) The University of Dundee is a Scottish Registered Charity, No. SC015096.