IdConsensus {DECIPHER} | R Documentation

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

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

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

### Author(s)

Erik Wright eswright@pitt.edu

### See Also

`Seqs2DB`

### Examples

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

[Package DECIPHER version 2.8.1 Index]