IdentifyByRank(dbFile, tblName = "Seqs", level = 0, add2tbl = FALSE, verbose = TRUE)
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
.
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 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''.
FormGroups
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