Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
87 lines (56 sloc) 2.3 KB

NAME

WWW::PhyloBox - Perl interface to phylobox.appspot.com

SYNOPSIS

use WWW::PhyloBox;
use File::Slurp qw/slurp/;

my $phylobox = WWW::PhyloBox->new;

# this creates a phylogenetic tree from a remote file
my $tree1 = $phylobox->create(
    phyloUrl => 'http://www.phyloxml.org/examples/apaf.xml',
    response => "key",
    name     => 'Apaf-1 gene family tree with domain architectures',
);
print $tree1->name . " tree is at " . $tree1->url . "\n";

# read in PhyloXML to a string
my $phyloxml = slurp("phylo.xml");

# this creates a phylogenetic tree from string data
my $tree2 = $phylobox->create(
    phyloFile => $phyloxml,
    response  => "key",
    name      => "T. Rex speciation",
);

print $tree2->name " has a key of " . $tree2->key . "\n";

ABSTRACT

PhyloBox is an online environment for viewing, editing, sharing, and publishing phylogenetic trees. The preferred data format for importing phylogenetic trees is PhyloXML, but the Newick format is also marginally supported.

EXAMPLES

This example sets the API root, in the case of the developer wanting to talk to a different PhyloBox instance. It also uses a zipped remote PhyloXML file.

# this is the default api_root
my $phylobox = WWW::PhyloBox->new(
    api_root => 'http://2-0.latest.phylobox.appspot.com'
);

# this creates a phylogenetic tree from a remote zipped file
# Zipped Newick files are also supported
my $tree = $phylobox->create(
    phyloUrl => "http://example.com/phylo.xml.zip",
    response => "key",
    name     => 'A really big phylogenetic tree',
);
print $tree->name . " tree is at " . $tree->url . "\n";

ACKNOWLEDGEMENTS

This software was initially written at the GMOD Evolutionary Biology Hackathon 2010 at the National Evolutionary Synthesis Center (NESCent, National Science Foundation Grant # EF-0905606 ) in Durham, NC.

LINKS

http://phylobox.appspot.com

https://github.com/andrewxhill/PhyloBox/wiki

http://nescent.org

The PhyloJSON spec

http://phylobox.appspot.com/phylojson/version/1

Hominid Phylogenetic Tree in PhyloBox

http://2-0.latest.phylobox.appspot.com/#phylobox-2-0-f7fd33b2-932a-497a-9652-4732e1a3110f