taxonomy_subtree: Taxonomy subtree

Description Usage Arguments Details Value Examples

View source: R/taxonomy.R

Description

Given an ott id, return the inclusive taxonomic subtree descended from the specified taxon.

Usage

1
2
3
4
5
6
7
taxonomy_subtree(
  ott_id = NULL,
  output_format = c("taxa", "newick", "phylo", "raw"),
  label_format = NULL,
  file,
  ...
)

Arguments

ott_id

The ott id of the taxon of interest.

output_format

the format of the object to be returned. See the ‘Return’ section.

label_format

Character. Defines the label type; one of “name”, “id”, or “name_and_id” (the default).

file

the file name where to save the output of the function. Ignored unless output_format is set to “phylo”.

...

additional arguments to customize the API request (see rotl package documentation).

Details

If the output of this function is exported to a file, the only possible value for the output_format argument is “newick”. If the file provided already exists, it will be silently overwritten.

Value

If the file argument is missing:

If a file argument is provided (and output_format is set to “phylo”), a logical indicating whether the file was successfully created.

Examples

1
2
3
4
5
## Not run: 
req <- taxonomy_subtree(ott_id=515698)
plot(taxonomy_subtree(ott_id=515698, output_format="phylo"))

## End(Not run)

rotl documentation built on Oct. 23, 2020, 8:22 p.m.