Tuesday, July 31, 2007

Weekly update

Most of this week has been spent on the include/exclude data and data management feature. It's not quite complete yet. I've run into a lot of difficulty getting the event handlers to update the appropriate javascript variables.

This week I:
Updated the website with a working version (including color picker).
Worked on getting data manager working.

Next week's plan:
Finish data management page.
Start legend/logo export feature.
Look into copyright permissions info from google.

Thursday, July 26, 2007

Updated public version

Version 1.02 is up. Now users can edit their colors and their data input is simpler.

Removed need to input pop number and hap number

I simplified the input format requirements. The user no longer has to input the number of populations and haplotypes on the first line.

Sunday, July 22, 2007

Weekly update

This week I:
1. Got my code into SVN. I feel safer already.
2. Made the input protocol more flexible.
3. Allow users to set own population names.
4. Allow users to change haplotype colors.
5. Updated website.

Next week I will:
1. Update website with new version.
2. Get code into repository.
3. Add grouping of haplotypes feature.
4. Add include/exclude data screen.

Color picker working!!!

After some heartache, I finally got the colorpicker working. Now the user can change the colors for each of the haplotypes on the preview pane. I used Knallgrau's color picker as a base for this.

I ran into many problems trying to get an event handler to fire correctly. I tried at first to have the pie colors update simultaneously with the color picker's. I wanted to associate an event handler with changes to the input field's value (string of HTML color type), but for some reason the value is hidden from the event handler. Eventually, I tied an event handler to clicking the 'ok' button of the color picker. There is only one color picker display for all of the haplotypes though, so I had to loop through them all to find the one that had changed. Then we loop through the corresponding pie slice and reset their fill color. Remarkably, this is super fast.

Setting the default map type in Google Maps

So I ran into a silly bug trying to set the default map type (default, satellite, or hybrid) on a google map. Basically I kept getting an error and the map wouldn't load even though I triple checked the constant's name, etc. Turns out that the order that you call setMap commands matters. Turns out that the setCenter() command must be given first before any other alterations to the map can be done. Here's the code for setting the map to satellite view by default:

map.setCenter(new GLatLng(36.739067, -77.905517), 5);
var givenmaptypes = map.getMapTypes();
map.setMapType(givenmaptypes[1]);


I think you can set the maptype within the setCenter function call as well. This Google Maps API thread was useful as well.

Tuesday, July 17, 2007

Can specify own names of populations

Added ability of user to set their own population names. (version 1.01).

Updated website, fixed extra whitespace bug, uploaded new version 1.0

Fleshed out the website with a bit more content. Hopefully made the instructions easier to follow.

Fixed the whitespace bug in the input form. Now the program doesn't crash with beginning or trailing whitespace and accepts data delimited both by tabs and/or spaces.

Symbolic links in UNIX

Just a note to self here:

To create a symbolic link use the following command:
ln -s [source file or directory] [target name]

Note: I can't figure out how to overwrite sym-links to point to new things. It's easiest to delete the old link, then write the new one.

Escape Characters link

Note to self: helpful escape character link:

http://www.digitalmediaminute.com/reference/entity/index.php

bugs fixed -- comment console.logs out

So I was running into the problem that the program worked fine on my machine but was puking on David's. The problem turned out to be how I was debugging my programs. I've been outputting debugging info to a console log readable in the Firebug program. If you don't have Firebug installed, the console functions are not understandable and the browser barfs. So after commenting out all my console logs, the problem went away.

I also noticed the bug that if you moved a pie and zoomed the map, the pies would not be in the right location. Turns out that I had been updating the population centers twice (once on drag, then again on zoom with the same move state), so was getting erroneous placement info. Once again, turned out to be an easy fix. Just commented out the second population updater in the zoom event handler.

Does NOT work in Internet Explorer

PhyloGeoViz does NOT work in IE. But it does work in Firefox. Have no idea why it doesn't work in IE. This will be a bear to work out I think. I don't know if it's worth it. Any arguments why I should or should not take the time to fix it?

slow run time

One thing I noticed when running PhyloGeoViz with my full dataset (~85 pops and ~40 haplotypes) was that the pie generation is pretty slow. I'll have to look to ways to speed it up. In the meantime, I need to put up some sort of disclaimer to the user.

Sunday, July 15, 2007

Weekly update

Sorry for the lack of posts, I was away at the Botany 2007 conference in Chicago. Things went great at the conference. I managed to get the PhyloGeoViz skeleton mostly working prior to the conference and was able to actually input my own data into the program! It was a great moment. I then created most of my talk's slides based on this output. I pitched the project and NESCent's Phyloinformatics Summer of Code and Google's Summer of Code programs at the end of my talk. Several people approached me afterwards, and they seemed very interested in participating next year! So hopefully I was able to do some recruiting.

On the coding front, I fixed a bad bug that was causing the program to barf in versions of Firefox without the debugger plugin. Unfortunately, the code still doesn't work in Internet Explorer. I also fixed a bug relating to dragging and zooming pies.

To do for this week:
  • Catch up on the project blog and chronicle what changes I've made to the code and my bug fixes.
  • Write function that will output the legend as overlay data in the exported kml.
  • Write function that can change the boundaries of the bins for the different pie sizes.
  • Write feature so that user can choose whether all the pies are the same size or have relative sizes.
  • Write a color picker function for changing the haplotype colors.

Monday, July 2, 2007

Bug fixed

Turns out php was trying to interpret the xml header declaration as php. Adding an echo statement cleared out this bug.

Thanks, Jack for pointing this out!

Weekly plan

This week is a bit frantic because I leave for the Botany conference on Saturday. I've been making a big push to have PhyloGeoViz ready for an alpha release and debut there. Here's my to do list for this week:
  • Transfer homepage style to the other app pages so the look is consistent.
  • Figure out export.php bug on server so that it will run!
  • Write function that will output the legend as overlay data in the exported kml.
  • Write function that can change the boundaries of the bins for the different pie sizes.
  • Write feature so that user can choose whether all the pies are the same size or have relative sizes.
  • Write a color picker function for changing the haplotype colors.
  • Import and manipulate my own data to create slide for talk!!!

Beautiful site design -- Thanks, Jack!

Another project this weekend was to create a nicer looking home for the app on the web. The main page for the project will be at http://phylogeoviz.org/. Jack helped me out with some CSS stuff and put together a great looking page for the project. It's great having a web designer in the family! Anyways, the front page looks great and I'll get to linking it with the actual app later this week.

Thanks, Jack!

Bug! help!

I've got Version 0.2 up, but unfortunately the export php script fails! Oh no! Of course, the script runs fine on my machine and environment, but on the server no longer functions. Why, oh why! Here's the error:

Parse error: syntax error, unexpected T_STRING in /home/.nayla/zeppox/oenimal.net/erica/version_0.2/export.php on line 5

I thought it might be a php version issue, so updated the php version on the server, so now we're both running php 5.2.2. But the error remains. Maybe it's a security issue with php? Anyways, any ideas??

Version 0.2 up

Busy, busy week. Version 0.2 is up! I managed to get the export function working. The app can now write a kml file that can be read by Google Earth. This was a bit tricky because I had to fix several functions that weren't updating some of the variables properly after an event changed their state. In any case, that's working now.

I was also able to implement a few new features on the preview page. The pies can now be different sizes based on the population's sample size. The pies can also be increased or decreased in diameter. Also, I can now generate legend data. I'm showing the haplotype labels and their corresponding colors and the sample size to pie diameter legend data.

Drawing div circles using javascript

For the legend I had to generate circles of certain pixel sizes. To do so, I used Walter Zorn's helpful javascript graphics library.