00:00:00

2014 Architecture

by Open Tree of Life developers (primarily Mark T. Holder, Emily Jane McTavish, Duke Leto, and Jim Allman)

Big Thanks to NSF!

Notes

peyotl

  • Python library
  • implements much of the phylesystem-api
  • manages local instances of the phylesystem
  • call open tree web services for:
    • interacting with the "central" phylesystem-api
    • resolve names to the Open Tree Taxonomy
    • query against an estimate of the Tree of Life

Notes

Open Tree of Life

  • we've adopted a service oriented architecture.
  • things have gotten a bit complex...

Notes

2014 Architecture

Notes

Open Tree of Life APIs

Notes

peyotl api wrappers

  • make accessing the API simpler and more "pythonic"
  • improve stability - when the Open Tree of Life API version changes, the peyotl interface won't (hopefully)

Notes

Taxonomic Name Resolution Service

  • calling in "taxomachine" by Cody Hinchliff.
from peyotl.sugar import taxomachine
print taxomachine.TNRS('Anolis sagrei')

returns a object summarizing the possible matches.

Notes

Getting a pruned version of the "full tree"

from peyotl.sugar import treemachine as tm
o = [515698, 515712, 149491, 876340, 505091, 840022, 692350, 451182, 301424, 876348, 515698, 1045579, 267484, 128308, 380453, 678579, 883864, 863991, 3898562, 23821, 673540, 122251, 106729, 1084532, 541659]
r = tm.get_synth_tree_pruned(ott_ids=o)

returns the tree (currently only in an odd, in-house format called "Arguson")

Notes

Searching the input trees

  • calling in "oti" by Cody Hinchliff.
from peyotl.sugar import oti
n = 'Aponogeoton ulvaceus'
print oti.find_trees(ottTaxonName=n)

returns a list of objects listing studyID and treeID

Notes

Obtaining an input tree

from peyotl.api import PhylesystemAPI
pa = PhylesystemAPI(get_from='api')
print pa.get('pg_10',
             tree_id='tree3',
             subtree_id='ingroup',
             format='newick')
returns the ingroup of "tree3¨ from study "pg_10" in newick.

Notes

4 routes to an input tree

pa = PhylesystemAPI(get_from='api',
                    transform='server')
pa = PhylesystemAPI(get_from='api',
                    transform='client')
pa = PhylesystemAPI(get_from='external')
pa = PhylesystemAPI(get_from='local')
t =  pa.get('pg_10',...

Notes

"api" mode

request tree
look up location of study NexSON file
read NexSON file
extract tree
convert to newick
return to client

Notes

"api" + transform=client

request tree
look up location of study NexSON file
read NexSON file
return to client
extract tree
convert to newick

Notes

"external" mode

request tree
look up GitHub URL of study NexSON file
return to study NexSON client
extract tree
convert to newick

Notes

"local" mode

request tree
look up location of study NexSON file
read NexSON file
extract tree
convert to newick

Notes

"eviscerated web-services"

In the phylesystem-API:

  • the datastore is publicly accessible as the git repo (Emily Jane McTavish's talk)

  • the library (peyotl) adding functionality to the data was designed to be a server-side and a client-side library.

Notes

I'm hoping that peyotl will be:

  1. a useful tool for Python programmers,

  2. a easy-to-grok entry point to the intimidating set of services offered by the Open Tree of Life effort.

Notes