IdentifyByRank {DECIPHER} | R Documentation

## 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.

### 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 `level`s are interpreted as being that many levels from the last level in each rank. The `level` zero selects the base level (see below).

If the specified level of rank does not exist then the closest rank is chosen. Therefore, setting `level` to `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 to the end, “Saccharomyces”.

### Value

A `data.frame` with the `rank` and corresponding identifier as `identifier`. Note that quotes are stripped from identifiers to prevent problems that they may cause. The `origin` gives the `rank` preceding the `identifier`. If `add2tbl` is not `FALSE` then the “identifier” column is updated in `dbFile`.

### Author(s)

Erik Wright eswright@pitt.edu

### See Also

`FormGroups`

### Examples

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

[Package DECIPHER version 2.12.0 Index]