Learn R Programming

taxize (version 0.2.2)

phylomatic_tree: Query Phylomatic for a phylogenetic tree.

Description

Query Phylomatic for a phylogenetic tree.

Usage

phylomatic_tree(taxa, taxnames = TRUE, get = "GET", informat = "newick",
  method = "phylomatic", storedtree = "R20120829",
  taxaformat = "slashpath", outformat = "newick", clean = "true",
  db = "apg", verbose = TRUE)

Arguments

taxa
Phylomatic format input of taxa names.
taxnames
If true, we get the family names for you to attach to your species names to send to Phylomatic API. If FALSE, you have to provide the strings in the right format.
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).
taxaformat
Only option is slashpath for now. Leave as is.
outformat
One of newick, nexml, or fyt.
clean
Return a clean tree or not.
db
One of "ncbi", "itis", or "apg"
verbose
Print messages (default: TRUE).

Value

  • Newick formatted tree or nexml text.

Details

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

Examples

Run this code
# Input taxonomic names
taxa <- c("Poa annua", "Phlox diffusa", "Helianthus annuus")
tree <- phylomatic_tree(taxa=taxa, get = 'POST')
plot(tree, no.margin=TRUE)

# Genus names
taxa <- c("Poa", "Phlox", "Helianthus")
tree <- phylomatic_tree(taxa=taxa, storedtree='R20120829', get='POST')
plot(tree, no.margin=TRUE)

# Lots of names
taxa <- c("Poa annua", "Collomia grandiflora", "Lilium lankongense", "Phlox diffusa",
"Iteadaphne caudata", "Gagea sarmentosa", "Helianthus annuus")
tree <- phylomatic_tree(taxa=taxa, get = 'POST')
plot(tree, no.margin=TRUE)

# Output NeXML format
taxa <- c("Gonocarpus leptothecus", "Gonocarpus leptothecus", "Lilium lankongense")
out <- phylomatic_tree(taxa=taxa, get = 'POST', outformat = "nexml")
out
cat(out)

Run the code above in your browser using DataLab