Search This Blog

Wednesday, August 18, 2010

Demonstration of GSoC Project

The features that developed for the GSoC project will be available in the next Jalview release. You can also contact me and I can send you a jar file with the new features, or download the code from the Google code hosting page for Jalview and see my post on how to set up Eclipse with Jalview. The code submitted to Google is the same as rev 32 on the Google code host site.

Addendum: Jim posted a comment with a link to the webstart version.


  1. You can fetch sequences from RFAM via the sequence fetcher. Go to "File > Fetch Sequence(s)..." and a dialog box will appear.


  2. From the database drop down menu select RFAM (Full) for the "Full" alignment from RFAM or RFAM (Seed) for the "Seed" alignment. Seed alignments are the original alignments constructed to create a covariance model for searching databases. Full alignment are the result of a search using the covariance model against the sequence database. For this demonstration, I used RFAM (Seed), but selecting the RFAM (Full) will be very similar.

  3. Click the "Example" button to load an alignment name. Click the "OK" button to fetch the alignment.


  4. A new dialog box will appear with the alignment. The RFAM sequence fetcher retrieves files in Stockholm format, so Jalview can interpret the secondary structure information in the file. The secondary structure information in the file is displayed in WUSS notation and helices that are determined from this information are displayed as blue arrows in the Annotation panel.




  5. You can color the helices with the "By RNA helices" color option. Go to "Colour > By RNA helices."


  6. The helices should now be colored.


  7. To view the consensus logo in the Annotation panel, go to "View > Autocalculated Annotation > Show Consensus logo". The coloring of the logo will change based on which color scheme is selected.


  8. Close up of Consensus logo when "By RNA helices" or "Purine/Pyrimidine coloring is selected.




  9. To change the color scheme to "Purine/Pyrimidine" go to "Colour > Purine/Pyrimidine"




Monday, August 9, 2010

Fetching sequences from Rfam

I added the ability to fetch sequences from Rfam. Jim recommended that I do some refactoring of the code to reuse methods to fetch sequences from Pfam, which is a database for protein families, rather than RNA families. Rfam was designed to be similar to Pfam, so it wasn't too hard to add the ability to fetch sequences from Rfam to Jalview.

Under the guidance of Jim, I created an Xfam class in the jalview.ws package, which the Rfam and Pfam classes extend. ( Sidenote, there is an Xfam blog about new developments of the Rfam and Pfam databases. ) Then I added RfamSeed and RfamFull classes, similar to the ones for Pfam. These contain the methods to fetch sequences from the "seed" and "full" alignments available on Rfam in Stockholm format, respectively. I had to modify the names of some methods to keep things consistent. In SequenceFetcher.java (in package jalview.ws), I called addDBRefSourceImpl() for RfamSeed and RfamFull to enable calling Rfam sequence retrieval from the Jalview menu.

To fetch sequences from Rfam (and Pfam), Jalview accesses stable urls that can be used to get the alignments. In the RfamSeed and RfamFull classes, part of the url is hardcoded in with the correct variables for the query string (I learned this while I was creating the classes, see the wikipedia page on CGI and QUERY_STRING.)

The variables for the Rfam website:

  • 'acc': followed by "=" and the accession number will give you the corresponding familiy.
  • 'id': followed by "=" and the ID name will give you the corresponding familiy.

  • 'alnType': alignment type, can be 'seed' or 'full'

  • 'nseLabels': toggle for species names, can be 0 or 1

  • 'format': file format, can be 'stockholm', 'pfam', 'fasta' or 'fastau'.


  • Rfam has two mirrors, one at the Sanger Institute and one at Janelia farm. The Janelia farm mirror has not yet been updated to Rfam 10.0, so I used the Sanger Institute url.

    There's one bug and I think it might be in the Stockholm parser. If you go to View > Alignment properties... no dialog window pops up with the alignment properties.

Tuesday, August 3, 2010

Random colors for covariation color scheme

For the covariation color scheme, I want to generate random colors so I don't have to worry about storing an index of colors for an unknown number of helices. I found a nice algorithm at stackoverflow.com. I set up everything for the covariation color scheme and tried out the random color selection for each nucleotide.

Examples are below. I like the first example that uses pastels, but I worry that the colors are not distinct enough from each other. The problem with the second example is that the dark colors make it impossible to read the nucleotide; I could figure out how to make the text white in those cases.



Adding color schemes

Currently I'm adding color schemes, including the covariation color scheme. When you add a color scheme, files need to be edited in the jalview.schemes, jalview.jbgui, and jalview.gui packages. The jbgui package is named for the fact that JBuilder was used initially to automatically generate some of the code. The gui and jbgui classes have matching classes, but the classes in jbgui are preceded by a "G."

The GAlignFrame class maintains a shadow class for the user interface, and the class in the gui package, AlignFrame, has most of the logic. This class includes objects that you see in Jalview, such as buttons. The jbInit method adds the buttons into the gui and sets the properties of the buttons.

Step 1: Create a color scheme and put it in the jalview.schemes package
1a. make it a subclass of ResidueColourScheme (extends)
1b. You will probably write findColour methods that overrides the ones found in ResidueColourScheme
1c. May need to call an index of colors (eg. based on characters in the alignment); store these in ResidueProperties.java

Step 2: Edit ColourSchemeProperties.java in jalview.schemes package
2a. add in a new enumeration symbol for scheme
2b. List of functions to edit:
*getColourIndexFromName()
*getColourName(ColourSchemeI cs)
*getColourName(int index)
*getColour(java.util.Vector seqs, int width, int index)

Step 3: Add a new JRadioButtonMenuItem in GAlignFrame for scheme

Step 4: Edit setColourSelected function in GAlignFrame to check the menu item when the colourscheme is selected

Step 5: Add menu item text and action settings into the jbInit function so it calls a protected GAlignFrame action method (copy the nucleotideColour button example)
5a. Add protected void myButton_actionPerformed(ActionEvent e) function (at end of GAlignFrame)
5b. Add your menu item to the colourMenu window menu (at end of jbInit)
5c. Add your menu item to the colours ButtonGroup (above public void setColourSelected(String defaultColour)
*ButtonGroup colours -> syntax is colours.add(colorscheme)

Step 6. Create a new public method with the identical name (myButton_actionPerformed(ActionEvent e)) which calls changeColour(my new
colourscheme) in AlignFrame

Step 7: For more complex colourschemes, you'll need to make sure any calculated values (e.g. covariation) are completed before the color scheme is applied in the AlignFrame._actionPerformed function

Step 8: Repeat process in the PopupMenu
*There is no GPopupMenu! (this is because PopupMenu is a dynamic menu, so the JBuilder mechanism isn't used).

If you want to add the scheme to the Jmol applet:
Step 1: In jalview.gui package AppJmol.java
*Create public void method, scheme_actionPerformed method that creates new scheme object (right above setJalviewColourScheme method)

Step2: In jbgui.GStructureViewer.java
*add new JMenuItem for scheme
*setText for scheme and add actionlistner for scheme (setText and addActionListner)
*add empty public void scheme_actionPerformed method
*add scheme to colourMenu

If you want to add the scheme to the Jalview applet, it looks like you change these items:
*Add MenuItem in jalview.appletgui.AppletJmol.java
*Add action listener scheme.addActionListner(this);
*add to coloursMenu
*In actionPerformed method, setJalviewcolorscheme

Monday, August 2, 2010

MAFFT - multiple sequence alignment

One of my coworkers let me know about MAFFT, a multiple sequence alignment program. He thought that it might be useful for my Gsoc project. I found out that it uses a Jalview applet to display the results! Jalview is everywhere! Right now I know that Pfam, Rfam, Clustal, and MAFFT use Jalview applets to display their alignment results...

Addendum: I noticed right after I posted this that one of the alignments in the example file that Jalview has was generated by MAFFT! Shows how observant I am...

Nucleotide codes

I've added a purine/pyrimidine color scheme to Jalview and added descriptions for lesser used nucleotide codes. The page at the KEGG database has a useful table. Here are the ones that I added:

W Weak (A or T)
S Strong (G or C)
M Amino (A or C)
K Keto (G or T)
B Not A (G or C or T)
H Not G (A or C or T)
D Not C (A or G or T)
V Not T (A or G or C

Monday, July 26, 2010

Wrong about RALEE bug

After having email discussion with Sam Griffiths-Jones, the author of RALEE, I discovered that there was a difference interpretation, not a bug, and I decided that Sam's interpretation was better.

I had interpreted a contiguous run of base pairs to be a helix, but after looking at a few structures in VARNA, I realized that some of the "helices" could be considered one helix with a few bulges. Sam gave some good examples:

You have continuous on one side, but not the other:

.((((((...))).))).

Alignments where a helix is continuous in most sequences, but bulged occasionally:

AGCGCUUCG.CU
AGCGCUUCG.UU
AGCGCCGCG.CU
AGCGCUUCG.CU
AGGGCUUCC.CU
AGCGCUUCGGCU
((((...)).))

In the above case, what is a helix could be subject to arbitrary change, just by adding one sequence with a bulge.

Tuesday, July 13, 2010

Bug in RALEE code

I came across across a bug in the RALEE code that processes the secondary structure line in Stockholm files. The Stockholm file (of vault proteins) just happened to break the code that processes how many helices there are and associates a helix number with each base pair position. Here are the cases that I had to fix:

1. <<..<<..<<..<<<..>>>>>..>>>>

2. <<<<..<<<<<..>>>..>>..>>..>>

If there isn't another separate helix within the sequence, the helices that aren't separated by unpaired nucleotides can't be detected in the original code. I was able to fix the bug by adding more cases. Hopefully I haven't created another bug.

Monday, July 5, 2010

What happens when you open a Stockholm File?

Alot of things, and a journey through how Jalview works. I wrote out part of this before in my notebook, but I hadn't connected it to the Stockholm file parser before. I haven't described the different types of objects yet, but here is the data flow:


jalview.gui.Desktop calls file loading functions, Stockholm parse is called, and then a new window with the alignment is displayed.

In jalview.gui package
-Desktop.instance.inputLocalFileMenuItem_actionPerformed(viewport) is called
--->calls FileLoader.LoadFile() in jalview.io package
-------this starts a new thread, which calls FileLoader.run() (use start() method to do this)
-----------Checks file format
-----------Alignment object = FormatAdapter().readFromFile(source,format) in jalview.io package
-------------->calls AppletFormatAdapter.readFromFile
------------------>Calls StockholmFile()

In StockholmFile in jalview.io
-StockholmFile extends AlignFile which extends FileParse
--->Fileparse() resolves type, checks if valid file type, position in file
--->AlignFile() calls parse(), which is in StockholmFile()
------->StockholmFile.parse() called
-----------checks if file has Stockholm file features, e.g. starts with #STOCKHOLM \d.\d
-----------use regular expressions to figure out line type
--------------if not an annotation line, process sequence line and store in hashtable
--------------else, figure out annotation type
------------------>if GC annotation, call parseAnnotationRow() to parse secondary structure

StockholmFile.parseAnnotationRow(annotations member of AlignFile, ID, sequence)
-make Annotation array else
-for each position in sequence
---->make Annotation obj ann
-------->component secondary structure determined by getDssp3State (jalview.schemes.ResidueProperties)

(Basically this is creating an annotation for each position)

-create AlignmentAnnotation object annots
--->calls validateRangeAndDisplay()
------>calls labelsSecondaryStructure()

-returns annots


Finally, back in the Desktop instance, the viewport is changed and you see the alignment visualization.
--if viewport exists, update using firePropertyChange()
--else new AlignFrame object is created
-----new AlignViewport object is created and initialized

Regular expressions in Jalview

I was looking at this about a week ago, and I decided that it might be worthy of a blog post. Part of the parsing of Stockholm files in Jalview utilizes the power of regular expressions, and Jalview uses the com.stevesoft.pat package. It simplifies some of the syntax; a tutorial is online here.

With this package you can create Regex objects and compile and match regular expressions. The Stockholm file parser detects the end of the file, annotation and sequence lines, and parses lines using regular expressions.

Saturday, July 3, 2010

Bug tracker, svn

Jalview has a bug tracker which can be found here.

I found a bug with reading Stockholm files and I logged it there. There were a few Stockholm files from Rfam that I wasn't able to open. "\\" is used to denote the end of a Stockholm file, which coincidentally is found in urls! I fixed the bug by requiring that the line with "//" start with "//" or a space then "//".

After fixing this bug I decided to start a branch in my svn repository (just to try it out), but I found out that I did not do this correctly. The svn red book has a nice entry about branch philosophy. What you should do is copy the existing trunk into the new branch. This allows diffs to be created properly between different versions. For now I am not going to have branches since Jim is going to set up an official repository for Jalview later.

Thursday, June 3, 2010

How RALEE parses the secondary structure line

I've figured out how RALEE interprets the secondary structure line and figures out helices…I really don't like Lisp, haha. The GNU Emacs Lisp Reference Manual isn't too bad: http://www.gnu.org/software/emacs/manual/html_mono/elisp.html

Basically, this is what happens, in two separate functions.

Parse the secondary structure line from the Stockholm file (ralee-get-base-pairs)

Description: Keep a list of the positions of the open brackets and a list whose elements are paired positions. When you reach a close bracket, pair it with the last open bracket and store this pair in the "pairs" list.

  • Split the line into a "position" list (each character of the line is an element of the list)

  • Keep a "stack" list and a "pairs" list

  • Go through each element of the "position" list
    *if the base is an open bracket type, add the current position as the first element of the "stack" list

    *if the base is a close bracket type, create a 2 element list that consists of the first element of "stack" list and the current position. Add this list as the first element of the "pairs" list and remove the first element from the stack list.

Numbers indicate the order in which the pairs are added to the "pairs" list

<<..<<..>>..<<..>>>>
65..21..12..43..3456

Create a Hash of positions and which helix they belong to (ralee-helix-map)
Description: This function takes the pairs list generated by the above function as its input. It goes through the pairs and figures out how many helices there are and creates a hash where the keys are positions and the values are which helix they belong to.

Variables:
helix = the current helix, an int
helices = hash of the positions and which helix they belong to
lastclose = position of the last close bracket reviewed
lastopen = position of the last open bracket reviewed
open = position of current open bracket
close = position of current close bracket
pair = current pair (consists of open and close)
pairs = list of base pairs (input, elements are 2 element lists)
i = current pair (in pairs list)

  • Go through each item in pairs list

    *for the current pair, open is the first element and close is the second element
    *Check for an inner helix:
     catch things like
    ; <<..>>..<<..>>
    ; *
    if the lastclose comes before open, increment the current helix
    *Check for bulges:
     catch things like
    ; <<..<<..>>..<<..>>>>
    ; *

    <<..<<..>>..<<..>>>>
    cc..aa..aa..bb..bbcc

    compare current pair to all other pairs (this works because of the way that the pairs are stored)
    **if open of a pair comes before lastopen and also after current open
    **then find which helix the open belongs to. If it belongs to the current helix, do nothing. Otherwise increment the number of helices.

  • add the current open and close to the helices hash with the helix as the value

  • set lastopen and lastclose to open and close

Wednesday, June 2, 2010

Parsing WUSS notation of RNA secondary structure annotation

A key part of this project is to parse the secondary structure line of Stockholm files so that it can be interpreted for coloring schemes. I have been adding mini-goals as appropriate. I will probably also need to add code to check that the sequence length and secondary structure length are the same, as well as the same number of open and closed parentheses.

WUSS notation is used in RNA stockholm files to indicate secondary structure. WUSS notation can support more characters than I thought, but Rfam uses the simplified version that the covariance modeling program Infernal uses. The description of Rfam on the Janelia Farm page is


Rfam is a collection of multiple sequence alignments and covariance models covering many common non-coding RNA families. The main use of Rfam is as a source of RNA multiple alignments with consensus secondary structure annotation in a consistent format. In conjunction with the Infernal software package, Rfam covariance models (CMs) can be used to search genomes or other DNA sequence databases for homologs to known structural RNA families.


WUSS notation uses <>, (), [], and {} to indicate base pairs and ':', ',', '_', '.', and '~' as single stranded columns. Each type of symbols has subtle meaning, but for Infernal the structure annotation line only needs to indicate which columns are base paired to each other. Thus, full WUSS notation is not necessary and a simple minimal annotation uses <> to indicate base pairs and '.' for single stranded positions of the alignment.

In more detail taken from the Infernal user guide:

Base pairs: the different symbols indicate different depth
*<> for simple terminal stems
*() for "internal" helices enclosing a multifunction of all terminal stems
*[] for internal helices enclosing a multifunction that includes at least one annotated () stem already
*{} for all internal helices enclosing deeper multifurcations

Hairpin loops
*indicated by underscores '_'
*Simple stem loops example: <<<____>>>

Bulge, interior loops
*indicated by dashes '-'

Multifurcation loops
*indicated by commas ','
*example: <<<___>>>,,<<<__>>>

External residues completely outside structure
*indicated by colons ':'

Insertions
* . to a known structure
* ~ used to indicate that a local structural alignment left regions of target and query unaligned.

Pseudoknots
* pairs of upper case/lower case letters
* example: <<<<_AAAA____>>>>aaaa


Things that I am thinking about:

-I need to interpret WUSS notation in a general way. It shouldn't be too difficult, but it is necessary since the same structure can be written in multiple ways. An example from the Infernal user guide is : <<<<....>>>> and ((((____)))) and <(<(._._)>)> all indicate a four base stem with a four base loop

-How should I store the secondary structure line so that it will be easily interpreted to implement coloring schemes?

Potentially I can store pairs of positions like how the disulfide bond positions are stored as annotations (Jim pointed this one out). I also need to keep in mind that bulges might exist, so I can't just interpret a run of the same type of bracket as part of the same stem. VARNA interprets bulges just fine, so I don't have to worry about that. An example of a complicated structure with a bulge:

<<<<……<<<< <<<<…..>>>>..>>>>……<<<<…>>>>….>>>>

-How can I make sure that there are 4 stems instead of 3? I can't simply scan through from left to right or eat away at both ends at the same time. It looks like the RALEE mode for Emacs handles bulges just fine based on this example in the readme




0123456789012345678901234
.<<<<<...>>.<<...>>..>>>.


Column 1 pairs with 23
2 with 22
3 with 21
4 with 10
5 with 9
12 with 18
13 with 17



The image is from VARNA. Note the numbering in the image starts at 1 instead of 0.

RALEE is written in Emacs Lisp, so I need to look up some basics in Lisp before I can feel confident that I'm interpreting the code correctly! I think that this code will cut down on my thinking time, however.

To do
-check that secondary structure line and sequence are the same length. Does Jalview already do this?
-change all bracket types to () for VARNA (I just noticed that VARNA only likes (), not <> for base pairing! )
-convert all WUSS symbols to something simple, like how Jalview already does for protein secondary structure (simple helices and sheets)
-Need to figure out how to detect pseudoknots
-Add support for error checking when a user adds a base pair annotation. Make sure same number of column groups are selected
-How will colors cycle for different numbers of stems?

Tuesday, June 1, 2010

Add Patches

I added a patch to the Jalview code for the first time. There's a bug with the annotations display preferences for the latest Jalview release (2.5), and Jim has implemented a patch with a temporary fix.

To add a patch in Eclipse:

  1. Menu > Windows > Open perspective > Others...> Team synchronizing

  2. Menu > Project > Apply patch...

  3. Select Clipboard and paste text from patch file, click next, select file you want to patch and click finish



You can also add a patch using the "patch" command on the command line:


  1. Open a terminal and change into the project directory.

  2. Apply the patch with
    patch -p0 -i patchfile


I found more information on applying patches here:

Info on applying patches

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.