dbTaxonomy: Read and Write Taxonomy Table

Description Usage Arguments Details Value See Also

Description

Create, extend and read the taxonomy table of a megaptera project.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dbReadTaxonomy(
  megProj,
  tip.rank,
  subset,
  tag,
  root = "tol",
  syn = FALSE,
  drop.extinct = TRUE
)

dbUpdateTaxonomy(megProj, taxonomy, logfile = "")

Arguments

megProj

An object of class megapteraProj.

tip.rank

A character string giving the rank of the tips (e.g. species, genus, ...).

subset

A subset of species names (Latin binomials) to which the taxonomy should be limited. Can be a DNA alignment of class DNAbin, a phylogenetic tree of class phylo,species_sequence (see Details), or a character vector.

tag

A character string used to tag the rows of taxonomy in the postgreSQL table; this argument is mostly for internal use.

root

A character string. By default ("tol"), all higher ranks from the most recent common ancestor (MRCA) of the clade of interest down to the root are included in the taxonomic classification, whereas "mrca" means that only the MRCA will be included. Note that this option only makes sense in combination with subset.

syn

Logical, indicating if synonyms should be returned in addition to accepted names.

drop.extinct

Logical, if TRUE all lineages that lack a taxon of rank "tip.rank" will be pruned from the taxonomy.

taxonomy

A data frame containing a taxonomic classification of the study species. It will replace any existing taxonomy in the database.

logfile

A character string giving the names of a potential logfile; no logfile is written if this argument is left empty.

Details

If step stepF has been run, dbReadTaxonomy can be called with subset = "species_sequence". In that case all species names with sequence data for the current locus will be used for subsetting.

Value

For dbReadTable an object of class "data.frame" holding the taxonomic classification of target species. dbUpdateTaxonomy is called only for its side effect creating and extending the taxonomy database table.

See Also

ncbiTaxonomy for retrieval of taxonomies from the taxonomy database at NCBI; findRoot returns the lowest common rank for taxonomies. dbReadDNA and dbWriteDNA to read and write DNA sequences.


heibl/megaptera documentation built on Jan. 17, 2021, 3:34 a.m.