Skip to content

PhyloBox API For Developers

leto edited this page Nov 11, 2010 · 1 revision

This document will describe how PhyloBox developers will use the PhyloBox API.

Background: http://biodivertido.blogspot.com/2010/06/phylobox-better-way-to-do-phylogenetic.html

POST Version 2.0

url =* http://2-0.latest.phylobox.appspot.com/new*

params

  • phyloFile: PhyloXML or Newick file uploaded, or a URL to a PhyloXML or Newick file hosted remotely. Files over 1mb should be Zipped first.
  • store: int or null or 'permanent'. Integer number of days to store the file. Defaults to 30 days.
  • response: "data", "key", "widget", "png", tells PhyloBox what to return, default 'data'
    • right now we've only built key (json), data (json)
    • format of the key response is a json object containing a 'key' element and a 'link' element

An alternative to posting a phyloFile object, we allow users to post a phyloUrl string. phyloUrl is a url to a PhyloXML or Newick file stored remotely (i.e. on your server). PhyloBox will then process and visualize that file for you. We perform a fetch of the url and cache the result on a daily bases (i.e. the url will be fetched a maximum of once per day depending on user requests). The file stored at the url also needs to be smaller than 1mb, you can store a zipped version of your tree to increase your tree size.

cURL Version 2.0

first grab the example file from phylobox

curl -o example.xml http://2-0.latest.phylobox.appspot.com/static/files/example.xml 

next, post the file to phylobox and receive a link to later view the tree

curl -F "response=key" -F "phyloFile=@example.xml" http://2-0.latest.phylobox.appspot.com/new

WWW::PhyloBox - PhyloBox bindings for Perl 5

This Perl module will be released on CPAN and has minimal depencies, i.e. it does not depend on BioPerl or installing any kind of software from PhyloBox. These bindings will be most useful for anyone wanting programmatic access to the PhyloBox API from Perl 5.

https://github.com/leto/www-phylobox