codonTable-class {coRdon}R Documentation

An S4 class codonTable

Description

Contains codon counts and optional annotation for a set DNA sequences.

Usage

codonTable(x)

## S4 method for signature 'DNAStringSet'
codonTable(x)

## S4 method for signature 'matrix'
codonTable(x)

## S4 method for signature 'data.frame'
codonTable(x)

codonCounts(object)

## S4 method for signature 'codonTable'
codonCounts(object)

getID(object)

## S4 method for signature 'codonTable'
getID(object)

getlen(object)

## S4 method for signature 'codonTable'
getlen(object)

getKO(object)

## S4 method for signature 'codonTable'
getKO(object)

setKO(object, ann)

## S4 method for signature 'codonTable'
setKO(object, ann)

getCOG(object)

## S4 method for signature 'codonTable'
getCOG(object)

setCOG(object, ann)

## S4 method for signature 'codonTable'
setCOG(object, ann)

Arguments

x

An object of DNAStringSet, matrix or data.frame class.

object

A codonTable object.

ann

A character vector of sequence annotations, must be of length equal to length(object).

Value

A codonTable.

Methods (by generic)

Slots

ID

A character vector of sequence identifiers.

counts

A matrix containing codon counts. Columns are codons, rows are sequences.

len

A numeric vector,length equal to nrow(counts), containing lengths of sequnces.

KO

A character vector of KEGG annotations for sequences, length equal to nrow(counts). If no annotation is available, this will be an empty vector.

COG

A character vector of COG annotations for sequences, length equal to nrow(counts). If no annotation is available, this will be an empty vector.

Examples

# create codonTable with codon counts for sequences in DNAStringSet
require(Biostrings)
dna <- DNAStringSet(c("ACGAAGTGTACTGTAATTTGCACAGTACTTAAATGT",
                      "ACGTCCGTACTGATCGATTCCGTGATT"))
cT <- codonTable(dna)
codonCounts(cT)
getlen(cT)
getKO(cT)
cT <- setKO(cT, c("K00001", "K00002"))
getKO(cT)

# convert matrix containing codon counts to codonTable
mat <- matrix(sample(1:10, 122, replace = TRUE), nrow = 2)
codonTable(mat) # produces informative warning


[Package coRdon version 1.2.0 Index]