build_info: Create a 'info' data frame.

View source: R/build_input.R

build_infoR Documentation

Create a 'info' data frame.

Description

This function creates an 'info' object for a given list of species.

Usage

my.info <- build_info(species = species.list, tree = tree, db="ncbi",
                   mode="list", find.ranks = TRUE, interactive =FALSE,
                   genus = FALSE, prior.info = NULL, verbose = TRUE)

Arguments

species

Character vector or a single-column data frame including the species of interest. Word breakers must be blanks (" ") or underscores ("_").

tree

A 'phylo' object with the backbone tree (set to NULL if mode is "list").

find.ranks

Logical. If TRUE, taxonomic information will be retrieved from the specified taxonomic repository to identify supra-generic MDCCs for the PUTs.

db

Taxonomic repository to query if find.ranks is set to TRUE. One of 'ncbi' (default), 'itis', 'gbif' or 'bold'.

mode

If mode is "list", the info data frame will be filled with the species provided in the species argument. If mode is "backbone", the info data frame will also include all the tips in the backbone tree.

interactive

Logical. Whether or not ambiguous species names will be resolved manually as they appear when retrieving taxonomic information. If FALSE, NAs will be returned in the corresponding row of info.

genus

Logical. Whether or not the backbone tree is resolved to the genus level. If TRUE, all the taxa in the tips of the phylogeny and the species vector must represent genera.

prior.info

A previously created info data frame that is recycled to build the new info.

verbose

Logical. Whether or not to print the progress.

Value

An 'info' data frame

Author(s)

Ignacio Ramos-Gutierrez, Rafael Molina-Venegas, Herlander Lima

Examples


# Create a list of species to include in the phylogeny
 catspecies <- c("Lynx_lynx",
"Panthera_uncia",
"Panthera_onca",
"Felis_catus",
"Puma_concolor",
"Lynx_canadensis",
"Panthera_tigris",
"Panthera_leo",
"Felis_silvestris")

#Create the 'info' data frame
cats.info <- build_info(species=catspecies, tree= cats,
     find.ranks=TRUE, db="ncbi", mode="backbone")


iramosgutierrez/randtip documentation built on March 19, 2024, 6:35 p.m.