Skip to content

Instantly share code, notes, and snippets.

@bendmorris
Created November 18, 2013 20:15
Show Gist options
  • Save bendmorris/7534559 to your computer and use it in GitHub Desktop.
Save bendmorris/7534559 to your computer and use it in GitHub Desktop.
PhyloCommons web API use
import urllib2
my_query_url = 'http://phylocommons.org/query/prune=True&format=newick&taxa=Homo+sapiens%2CGorilla+gorilla%2CPan+paniscus%2CPan+troglodytes&tree=bininda-emonds_mammals'
result = urllib2.urlopen(my_query_url)
tree = result.read()
print tree
# ((('Pan paniscus':3.90000,'Pan troglodytes':3.90000)Pan:5.80000,'Homo sapiens':9.70000):3.00000,'Gorilla gorilla':12.70000)Homininae:7.00000;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment