Learn R Programming

DECIPHER (version 2.0.2)

IdConsensus: Create Consensus Sequences by Groups

Description

Forms a consensus sequence representing the sequences in each group.

Usage

IdConsensus(dbFile, tblName = "Seqs", identifier = "", type = "DNAStringSet", colName = "identifier", processors = 1, 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 in which to form consensus.
identifier
Optional character string used to narrow the search results to those matching a specific identifier. If "" then all identifiers are selected.
type
The type of XStringSet (sequences) to use in forming consensus. This should be (an abbreviation of) one of "DNAStringSet", "RNAStringSet", "AAStringSet", or "BStringSet".
colName
Column containing the group name of each sequence.
processors
The number of processors to use, or NULL to automatically detect and use all available processors.
verbose
Logical indicating whether to display progress.
...
Additional arguments to be passed directly to ConsensusSequence for an AAStringSet, DNAStringSet, or RNAStringSet, or to consensusString for a BStringSet.

Value

An XStringSet object containing the consensus sequence for each group. The names of the XStringSet contain the number of sequences and name of each group.

Details

Creates a consensus sequence for each of the distinct groups defined in colName. The resulting XStringSet contains as many consensus sequences as there are distinct groups in colName. For example, it is possible to create a set of consensus sequences with one consensus sequence for each "id" in the tblName.

See Also

Seqs2DB

Examples

Run this code
db <- system.file("extdata", "Bacteria_175seqs.sqlite", package="DECIPHER")
con <- IdConsensus(db, colName="identifier", noConsensusChar="N")
BrowseSeqs(con)

Run the code above in your browser using DataLab