phylomatic_local: Use Phylomatic locally - ideal for large queries

Description Usage Arguments Details Value Examples

View source: R/phylomatic_local.R

Description

Use Phylomatic locally - ideal for large queries

Usage

1
2
phylomatic_local(taxa, taxnames = TRUE, storedtree = "R20120829",
  db = "apg", lowercase = FALSE, nodes = FALSE, verbose = TRUE)

Arguments

taxa

(character) Phylomatic format input of taxa names. required

taxnames

If TRUE (default), 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. See Details.

storedtree

One of R20120829 (Phylomatic tree R20120829 for plants), smith2011 (Smith 2011, plants), binindaemonds2007 (Bininda-Emonds 2007, mammals), or zanne2014 (Zanne et al. 2014, plants). Default: R20120829

db

(character) One of "ncbi", "itis", or "apg". Default: apg

lowercase

(logical) Convert all chars in taxa file to lowercase. Default: FALSE

nodes

(logical) label all nodes with default names. Default: FALSE

verbose

(logical) Print messages. Default: TRUE

Details

uses phylocomr::ph_phylomatic() under the hood

This function uses Phylomatic via Phylocom using the phylocomr package. The interface is slightly different from phylomatic(): there's no tree by URL available, and some of the parameters are not included here.

If you set taxnames = FALSE, you need to pass in a character vector, with each element like this example: "asteraceae/taraxacum/taraxacum_officinale", of the form "family/genus/genus_specfic epithet"

Value

Newick formatted tree as phylo object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
library('ape')

# Input taxonomic names
taxa <- c("Poa annua", "Phlox diffusa", "Helianthus annuus")
(tree <- phylomatic_local(taxa))
plot(collapse.singles(tree), no.margin=TRUE)

taxa <- c("Poa annua", "Collomia grandiflora", "Lilium lankongense",
"Phlox diffusa", "Iteadaphne caudata", "Gagea sarmentosa",
"Helianthus annuus")
(tree <- phylomatic_local(taxa))
plot(collapse.singles(tree), no.margin=TRUE)

library("taxize")
spp <- names_list("species", 500)
length(spp)
(tree <- phylomatic_local(spp))

## End(Not run)

brranching documentation built on Dec. 6, 2018, 1:03 a.m.