Search This Blog

Monday, May 24, 2010

Beginning of Coding!

Today is the official start of coding! I have already started coding to make up time that I'll lose at the RNA Society Conference. I've added the .sto option as readable extensions into Jalview. There is already a Stockholm file parser in Jalview, but it wasn't obvious in the dialog box for opening alignment files.

I'm not quite as far as I want to be for coding, partly due to the time I spent on looking at RNA secondary structure viewers, but I think that the rest of the summer will be better for it. I am also still getting some requests from my thesis advisor for work, and I need to remind him that I have this other project going! He was very supportive of me doing GSoC, so I think he has just forgotten that coding has started.

I've talked to two other RNA biologists about the features they would like in an RNA secondary structure viewer. VARNA doesn't have all of the visualization that scientists might want, but perhaps I can add these if I have time. Thinking about how other scientists might use the secondary structure viewer has been a lesson in software development. How will the user launch VARNA? What kind of interaction will they have with it? What kind of interaction will Jalview and VARNA have?

I'm glad that most of the planning is over and I can really get into coding!

Friday, May 21, 2010

Just for fun

It's a banana slug observed in its natural habitat! I took this picture on the UCSC campus and decided to share. The banana slug is the UCSC mascot. I'm always surprised at how yellow these things are. The hole in it's side is how it breathes. If you look closely you can see its eyes at the end of the "feelers."

Thursday, May 20, 2010

Importing VARNA into Eclipse, Jar files

I was trying to look at the VARNA source code last night, but it was in a JAR file. I tried to find a JAR file plugin for Eclipse, but I couldn't get it to work. I tried JadEclipse.

I ended up using the jar command in unix to unzip the file and copy it into Eclipse. I then had a funny Java libray error.

Jim helped me out with importing the VARNA code into Eclipse and fixed the library error I was getting. Jim's instructions are below for interested parties. =)


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:
1. Open the 'File->Import...' dialog.
2. Choose the 'Existing projects into workspace' entry under the 'General' tab.
3. Select import from archive, and locate the VARNA source archive.
4. 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.

5. 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.
5. e. Check the 'allow output folders for source folders
5. f. Change the default output directory from VARNA3-1/bin to VARNA3-1/
6. 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.

RNA Secondary Structure Viewers

One of the goals of this project is to embed a secondary structure viewer into Jalview for RNA. At today's meeting with Jim, it looks like there might be some interactive editing features that we'd like to implement into VARNA, if we choose it. Adding interactive base connection making and breaking would be nice. I'm pretty sure that we will use VARNA. The advantages of VARNA are:

1. It is written in Java and under the GPL license. This means that it can be easily added to Jalview.

2. You can specify secondary structure with WUSS notation

3. It exports the image you make in a variety of formats

4. (My opinion) It has pretty output.

5. You can add annotations and change color of bases

6. Other features allow different visualization schemes, such as basepairing and modes such as "Feynman's diagram"

7. Can handle a variety of file formats (.ct, .dbn, etc)

One interesting thing about VARNA is that it can create multiple panels in the visualization window. This might be useful for comparing a multiple sequence alignment. On the other hand, another type of visualization might be useful, such as overlaying the structures and using color to indicate conservation.

After looking at various RNA structure viewers, it looks like it might be useful to add more valid file formats in Jalview, such as ConnecT (.ct), Base Pair Sequence (.bpseq), and Dot Bracket Notation (.dbf, .dbn).

Below is a list of some RNA secondary structure viewers that I've looked at.

VARNA: Visualization Applet for RNA
http://varna.lri.fr/index.html

RNA-DV
http://rna-dv.sourceforge.net/

jViz.RNA 2.0
http://jviz.cs.sfu.ca/index.html

XRNA
http://rna.ucsc.edu/rnacenter/xrna/xrna.html

RNA2D3D
http://www-lmmb.ncifcrf.gov/~bshapiro/structurelab/structureLab.html

SStructView
http://helix-web.stanford.edu/sstructview/home.html

RNAmovies
http://bibiserv.techfak.uni-bielefeld.de/rnamovies/

RnamlView
http://ndbserver.rutgers.edu/services/help/rnamlview-readme.html

List from: http://openwetware.org/wiki/Wikiomics:Alignment_visualization_and_plotting_RNA_structures

Thursday, May 13, 2010

Using Eclipse as an IDE

I'm still getting used to Eclipse. After watching Jim use it over skype it looks like it will make my life easier in the long run. For anyone who wants to learn how to use it, here is a brief tutorial:

https://eclipse-tutorial.dev.java.net/eclipse-tutorial/part1.html

Getting Jalview to compile properly in eclipse was a bit more tricky than I thought - Jim helped me out. First, I followed directions from a post in the jalview-discuss mailing list:

1. Create a new project where you have (at least in eclipse) specified a
distinct source folder called 'src', and a distinct build folder called
'classes'.


To do this in eclipse, you can do this when you first create the project by clicking on the "Create separate folders for sources and class files" option and going to "configure defaults." Here you can indicate that the output folder should be called "classes." If you have already created the project, right-click the Jalview folder and select "Properties." Then go to Java Build Path, select the Source tab and select the default output folder (or create the output folder).


2. Unpack the source distribution and copy all the files under jalview/
into the new project's folder. This will overwrite the src directory
with the one of the same name containing jalview's source.


I did this simply by dragging the files over into eclipse under the jalview project that I had created.


3. Configure your project's build and runtime dependencies
- all the dependencies needed to run jalview are in
jalview/lib
- Use the ant build script (jalview/build.xml) to
build jalview
* for this to work correctly, add jalview/utils to the
ant classpath and the build classpath to resolve the
remaining compile-time dependencies
- look at the output of the default build target to see
what each ofthe different targets do.
You need to add jalview/lib and jalview/utils to the buildpath. This is discussed in the eclipse tutorial I posted above. To do this, right click on the jalview folder and go to "Properties." Click on "Java Build Path" and the "Source" tab. Now you can add the folders lib and utils by clicking on the "Add folder" button.

The tutorial also goes over how to add JAR files. I wasn't sure if it was necessary in this case but I did it anyway. Click on the "Libraries" tab and click on "Add JARS." There are JARS in the lib and utils folders that you can add.

Lastly, you need to make sure to import the builder correctly. In the Project Menu bar, go to "Properties", click on "Builders." If you don't see Jalview build.xml [Builder], then you need to add it. Do this by:

1. build.xml is one of the files in the Jalview source that is not in a folder. Right click on it and go to "Properties."
2. In the Build tab, uncheck "Build before launch." You may need to click on "Run/Debug Settings" and click on Jalview Build.xml to get to this view.
3. In the Targets tab, uncheck usage, check "build indices"
4. In the Classpath tab, make sure that the jalview/utils and jalview/lib have been added
5. click apply

Go to Project Menu > Properties. Import the Jalview builder. Move it up in priority (maybe not too crucial).

To run Jalview, in Jalview/bin, right click Jalview.java and select run as application!

Adding VARNA, source code up!

I've introduced myself to the jalview-discuss list! Hopefully I won't be flooded with requests.

I had a meeting with Jim today and he went over some of the details on how Jmol is embedded into Jalview. This will help me add VARNA to Jalview, if possible. The main places I will need to look for inspiration (or modify) will be the

StructureSelectionManager class in the jalview.structurepackage
AppJmol class in jalview.gui package
PopupMenu class in jalview.gui package

I emailed Yann Ponty, one of the VARNA authors and he responded very warmly. He took a brief look at my goals and wrote that VARNAPanel does not support mouseover events. I need to look more closely at the code to see if this will make my job difficult.

I also added Jalview ver. 2.5 source code to Google's open source project hosting site, code.google.com. I used svn:

svn import jalview-2.5 https://jalview.googlecode.com/svn/trunk/ -m "First import" --username lauren.ucsc

Right now only Jim and I can add code. I added a project description but I need to figure out what needs to be on the wiki.

Monday, May 10, 2010

First Post - Setting up

This is my first blog post for my GSOC project! I've been setting up information pages about my project and set up this blog. See "Relevant links" on the side panel. More to come, including links to source code hosted by Google.