Difference between revisions of "PhyloSoC:phyloGeoRef"

From Phyloinformatics
Jump to: navigation, search
(Project Plan)
m (Project Plan)
Line 16: Line 16:
  
 
===Approach and organization: ===
 
===Approach and organization: ===
Start small and expand as needed. In this case I'm staring with the basic ability to take a tree file, deliminated file and  
+
Start small and expand as needed. In this case I'm staring with the basic ability to take a tree file, deliminated file and
 
Take a select few types of files to completion, then add more
 
Take a select few types of files to completion, then add more
  
A lot of the functions I need for this project have already been written and with a little modification they can be easily implemented in my library. This will allow me to be a little more creative and expand the scope of the library and what the library can do, beyond the original intention.  
+
A lot of the functions I need for this project have already been written and with a little modification they can be easily implemented in my library. This will allow me to be a little more creative and expand the scope of the library and what the library can do, beyond the original intention.
  
 
===Week 1:===
 
===Week 1:===
Line 33: Line 33:
 
Finish storeTree class:
 
Finish storeTree class:
 
Phylogeny array parser
 
Phylogeny array parser
Define function to add latitude, longitude and altitude data to each node. this will probably change a little bit once the actual algorithm is implemented  
+
Define function to add latitude, longitude and altitude data to each node. this will probably change a little bit once the actual algorithm is implemented
 
Define functions to parse shapefiles using GeoTools library
 
Define functions to parse shapefiles using GeoTools library
 
Define function to add metadata to the tree -> should be an extension of, or similar to, the csv parser already implemented.
 
Define function to add metadata to the tree -> should be an extension of, or similar to, the csv parser already implemented.
  
===Week 3 and 4:===
+
===Week 3:===
Write algorithm to determine latitude, longitude and altitude for each node in the tree. Calculating geospatial information is no trivial task. This information will vary based on the type of output the user requests such as KML or shapefile. This algorithm needs to be able to calculate how the tree should look in 3D space keeping in mind visual clarity. This requires knowing how many nodes, branches and leafs are on the tree and where leafs are anchored to the map. The simplest way would be a cone shape, with the base made up of the leaf coordinates and then equally spaced nodes until the root is reached at the peak. This will not work for really large trees, as the map would be way too convoluted. Turning on or off some of the branches or being able to collapse them would make the map easier to understand. Basic algorithm from Janies et al is the altitude for any given node = a + ((n-1)*b) where a is the altitude of a node with only terminal leafs (this can be an arbitrary number or based on the size of the tree), b is the altitude of nodes that are ancestral to more than one node and n is the number of node from the current node to the leaf. I will also look at the algorithms implemented in GeoPhyloBuilder for node positioning. These include envelope centroid method, mean position method, and for bifurcate trees the DAVA centroid and MCP centroid methods. I will also try to extend the geospatial functions in the JTS Topology suite for 2D spatial functions. 3D mapping is fairly new to me, so it may take me some time to come up with an optimal solution. I will rely heavily on algorithms already implemented in other geospatial applications.
+
Implement algorithm from Jamies et al, nodeAltitude = a + ((n-1)*b) where a is the altitude of a node with only terminal leafs (based on the size of the tree), b is the altitude of nodes that are ancestral to more than one node and n is the number of node from the current node to the leaf.
 +
 
 +
===Week 4:====
 +
Implement latitude and longitude algorithm. Leaves will get their lat/long data from the coord file.
  
 
===Week 5:===
 
===Week 5:===

Revision as of 19:19, 2 June 2010

phyloGeoRef: a geo-referencing library implemented in Java

Author

Kathryn Iverson

Abstract

The goal of this project is to create a geo-referencing library for parsing and displaying geographical and phylogenetic information. The main aim of the project is to bring together geographical and phylogenetic information in a way that is usable and useful to the user. Given an input of a tree file and geographical information the library will return a tree with phylogenetic and geographical information in a format such as KML or shapefile or a georeferenced phylogenetic format such as neXML.

Code

http://github.com/kdiverson/phyloGeoRef

Project Plan

Bonding period

Tasks: Gather sample tree files, KML files and other files used by the library; set up development environment; learn about geographical data files; catalog java tree and geospatial libraries Deliverables: psudocode for project -- what information needs to be extracted and how to store it; set up github account and integrate with Eclipse or other IDE, join mailing lists; study KML files; list of relevant java libraries

Approach and organization:

Start small and expand as needed. In this case I'm staring with the basic ability to take a tree file, deliminated file and Take a select few types of files to completion, then add more

A lot of the functions I need for this project have already been written and with a little modification they can be easily implemented in my library. This will allow me to be a little more creative and expand the scope of the library and what the library can do, beyond the original intention.

Week 1:

Define tree parser

Define csv parser

Define delimitated file parser, tsv and user defined

Start storeTree class

Week 2:

Finish storeTree class: Phylogeny array parser Define function to add latitude, longitude and altitude data to each node. this will probably change a little bit once the actual algorithm is implemented Define functions to parse shapefiles using GeoTools library Define function to add metadata to the tree -> should be an extension of, or similar to, the csv parser already implemented.

Week 3:

Implement algorithm from Jamies et al, nodeAltitude = a + ((n-1)*b) where a is the altitude of a node with only terminal leafs (based on the size of the tree), b is the altitude of nodes that are ancestral to more than one node and n is the number of node from the current node to the leaf.

Week 4:=

Implement latitude and longitude algorithm. Leaves will get their lat/long data from the coord file.

Week 5:

Define kml writer using jak library. Most of the KML writer functions exist in this library so my job will be to make sure the data is populated correctly. A major part of this will be telling kml how to draw the trees, ie where to put branches (line or pathway) and nodes (points).

Week 6:

Add support for other file types such as neXML. I really like SQL so if time permits, I'd like to add a way to extract tree information, geo coordinates and metadata from a database. It would also be neat to add some eye-candy to the metadata similar to the thematic engine.

Week 7:

Extensive testing and documentation

Week 8:

Clean up code

Refrences:

Janies, D., Hill, A.W., Habib, F., Guralnick, R., Waltari, E., Wheeler, W.C., 2007. Genomic analysis and geographic visualization of the spread of avian influenza (H5N1). Syst. Biol. 56, 321–329.