taxize (version 0.1.5)

phylomatic_tree: Format tree string, submit to Phylomatic, get newick or nexml tree.

Description

Format tree string, submit to Phylomatic, get newick or nexml tree.

Usage

phylomatic_tree(taxa, get = "GET", informat = "newick",
    method = "phylomatic", storedtree = "smith2011",
    outformat = "newick", clean = "true")

Arguments

taxa
Phylomatic format input of taxa names.
get
'GET' or 'POST' format for submission to the website.
informat
One of newick, nexml, or cdaordf. If using a stored tree, informat should always be newick.
method
One of phylomatic or convert
storedtree
One of R20120829 (Phylomatic tree R20120829 for plants), smith2011 (Smith 2011, plants), or binindaemonds2007 (Bininda-Emonds 2007, mammals).
outformat
One of newick, nexml, or fyt.
clean
Return a clean tree or not.

Value

  • Newick formatted tree, or nexml xml object.

Details

Use the web interface here http://phylodiversity.net/phylomatic/

Examples

Run this code
# Input taxonomic names
taxa <- c("Collomia grandiflora", "Lilium lankongense", "Helianthus annuus")
tree <- phylomatic_tree(taxa=taxa, get = 'POST', informat='newick',
   method = "phylomatic", storedtree = "smith2011",
   outformat = "newick", clean = "true")
plot(tree)

# Lots of names
taxa <- c("Collomia grandiflora", "Lilium lankongense", "Phlox diffusa",
          "Iteadaphne caudata", "Nicotiana tomentosa", "Gagea sarmentosa")
tree <- phylomatic_tree(taxa=taxa, get = 'POST', informat='newick',
                        method = "phylomatic", storedtree = "smith2011",
                        outformat = "newick", clean = "true")
plot(tree)

# Output NeXML format
taxa <- c("Gonocarpus leptothecus", "Gonocarpus leptothecus", "Impatiens davidis")
out <- phylomatic_tree(taxa=taxa, get = 'POST', informat='newick', method = "phylomatic",
   storedtree = "smith2011", outformat = "nexml", clean = "true")
library(RNeXML)
read.nexml(out, type="nexml", asText=TRUE)

Run the code above in your browser using DataLab