Learn R Programming

DECIPHER (version 2.0.2)

IdentifyByRank: Identify By Taxonomic Rank

Description

Identifies sequences by a specific level of their taxonomic rank.

Usage

IdentifyByRank(dbFile, tblName = "Seqs", level = 0, add2tbl = FALSE, verbose = TRUE)

Arguments

dbFile
A SQLite connection object or a character string specifying the path to the database file.
tblName
Character string specifying the table where the rank information is located.
level
Level of the taxonomic rank. (See details section below.)
add2tbl
Logical or a character string specifying the table name in which to add the result.
verbose
Logical indicating whether to print database queries and other information.

Value

A data.frame with the rank and corresponding identifier as identifier. The origin gives the rank preceding the identifier. If add2tbl is not FALSE then the ``identifier'' column is updated in dbFile.

Details

IdentifyByRank simply identifies a sequence by a specific level of its taxonomic rank. Requires that rank information be present in the tblName, such as that created by default when importing sequences from a GenBank formatted file.

The input parameter level should be an integer giving the ``level'' of the taxonomic rank to choose as the identifier. Negative levels are interpreted as that being many levels from the last level in each rank. The level zero selects the initial level.

If the specified level of rank does not exist then the closest rank is chosen. Therefore, the default level (Inf) will always select the last taxonomic level (i.e., genus).

For example, a representative ``rank'' imported from a GenBank file is: Saccharomyces cerevisiae Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Saccharomyces.

Setting level to 0 would result in an identifier of ``Saccharomyces cerevisiae'', because it is on the first line. A level of 2 would return ``Fungi'', and -2 (second to last) would return ``Saccharomycetaceae''. A level of Inf would find the nearest level, ``Saccharomyces''.

See Also

FormGroups

Examples

Run this code
db <- system.file("extdata", "Bacteria_175seqs.sqlite", package="DECIPHER")
ids <- IdentifyByRank(db, level=Inf)
head(ids)

Run the code above in your browser using DataLab