Friday, May 8, 2009
Multiple Image Scrolling
Monday, May 4, 2009
UBIO Common Name Search...
I also spent some time reorganizing the toolbar menus so that they feel a little more intuitive and take fewer clicks to get to what you want. I felt the original structure of the toolbar lead to a lot of overlap and confusion about where a desired option was located. I organized my menus as follows: - Layout (rectangular, circular, diagonal, unrooted)
- Node (images and other annotations)
- Label (unique, clade, show all, common name search)
- Performance (anti-aliasing, animation)
- Zoom
- Font
- Style (size, scaling, angles)
- Structure (sorting, flipping, branch lengths, etc.)

Sunday, May 3, 2009
UBIO Bugs
Thursday, April 30, 2009
NBII Image Search

When I get the response, I search for the term "Total images", since it indicates that I'm about to reach the place in the html where the images are listed. From then on, when I get to a line that contains "xt "Xthumbnail", since that indicates that I've gone past the section with the images I want.
Monday, April 27, 2009
Posting to a .php site
form action="search_results.php" method="post" enctype="application/x-www-form-urlencoded" name="frmSearch"Anyone know about this and have suggestions for how I go about posting a search term to this form? Thanks! Friday, April 24, 2009
Displaying Images (2)
Next: Monday, April 20, 2009
Downloading and Storing Images

Harvesting Images
Monday, April 13, 2009
Schedule Update
- Pre-parse newick tree files to replace the given number-encoding with the appropriate scientific names, before sending the tree string to the regular PhyloWidget parser
- Retrieve images from Morphbank as MIME attachments, based on searches by scientific name, and cache the images locally
- Incorporate a thumbnail version of the each image into the PhyloWidget tree display at its corresponding node, according to the diagram posted previously. (If time, allow multiple images per node and create arrows so that the user can scroll through the thumbnails for each.)
After this deadline, I plan to return to the current bug in my common name search to complete that portion of the code. I will also look at the way that PhyloWidget draws the trees with the alternative layouts, to determine how best to incorporate the images in those cases. Finally, I will consider the various ways to save a user's work and reload a saved file for later use and work on implementing that feature.
Sunday, April 12, 2009
Health and Interfaces
Thursday, April 2, 2009
Up and Running
Sunday, March 22, 2009
"Technical Difficulties"
But for the meantime, if it appears that I am not making due progress, this is why. I hope to have this resolved quite shortly, but since I have no idea what the problem is, all I can do is wait and see.
Friday, March 20, 2009
Common Name Search Begins
after text string "Scientific Match" search for "a href ='" string
save the next text till "'" as a link string
save a substring of the text after the next > and before <
compare that to the search term.
If it's a match
follow the saved link
on the resulting page:
Find the text "name = 'Common name'"
After that point, find "namebankID"
Save a substring of the text after the next > and before <
return the substring as the common name
Else
repeat by searching for next "a href = '" string
Stop when you've reached ".
Return either the search term or a null string as the common name.
Tuesday, March 3, 2009
Alpha Preparation
I spoke with Val to outline the four specific tasks I’ll need to complete in order to allow the user to input an organism’s name and end up with a tree complete with images and both the common and scientific names for each organism. I divided up the major coding tasks and estimated how long it would take me to do each and which order it would make the most sense, and I used that information to revise my Gantt chart.
I’ve spent the rest of this week revising and updating my design document to reflect what I’ve accomplished and my goals for the rest of the semester.
I also contacted Anne Olsen at The National Biological Information Infrastructure (NBII) to ask about how to search the NBII image database, at the recommendation of Greg Riccardi from Morphbank.
I'll be meeting with Joe on Thursday morning and Val on Thursday afternoon to review my progress and updated design document.
Monday, March 2, 2009
Revised Gantt Chart

Tuesday, February 24, 2009
Learning to SVN
Monday, February 23, 2009
URL Interactions
Thursday, February 19, 2009
Label Name Interception
The parser reads in the newick strings, and it is found in org.phylowidget.tree.TreeIO.java
public static RootedTree parseNewickString(RootedTree tree, String s)
parses through all the notation, handles determining the different levels of the tree and the parent-child relationships.
When it's created a string of text it considers the label, it calls:
PhyloNode curNode = newNode(tree, curLabel, nhx, poorMans);
static PhyloNode newNode(RootedTree t, String s, boolean useNhx, boolean poorMan)
...deals with NHX annotation stuff, then...
s = parseNexusLabel(s);
(removes single quotes and replaces underscores with spaces)
t.addVertex(v);
t.setLabel(v, s);
(self explanatory)
So that was pretty exciting, because it allowed me to understand how labels are created and stored in tree nodes, which will be useful since I plan to be able to intercept those labels before render time and change them. In practice, the idea is to display common names in place of scientific names for the organisms in the tree.
Then I went on to find the renderer. The class LabelRender is found inside NodeRenderer.java. In the method render(), we have
canvas.text(tree.getLabel(n), offX - curTextSize / 3 - s, offY - s - curTextSize / 3);
n is a PhyloNode and tree is a RootedTree so getLabel(vertex) is in RootedTree.java
that calls
vertex.getLabel() which is in PhyloNode.java (extends CachedVertex which extends DefaultVertex)
It is at this point that I intercept the label and change the return value so that the rendered label name is different than the stored one. I created a wrapper class for HashMap called NameLookup, which for testing purposes just stores mappings from each capital letter of the alphabet to the corresponding number, from 1 to 26.
I created a NameLookup object called map in
PhyloNode.java and updated the getLabel() method to look up the value in the map and return the resulting string (in this case a number). Any label that is mapped to null in the NameLookup map is changed to the string "Hi Val". The replacement label string gets passed along all the way back to the render.
For the tree:((A,B),(C,D),(E,F,G,H,'*'),I,J); we end up with the following image
