codonTable-class {coRdon} | R Documentation |
codonTable
Contains codon counts and optional annotation for a set DNA sequences.
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)
x |
An object of |
object |
A |
ann |
A character vector of sequence annotations,
must be of length equal to |
A codonTable
.
codonTable
: Create new objects of class codonTable
.
codonCounts
: Get codon counts from codonTable
object.
getID
: Get IDs for codonTable
class.
getlen
: Get lengths of sequences in codonTable
object.
getKO
: Get KO annotations of sequences
in codonTable
object.
setKO
: Set KO annotations
for codonTable
object.
getCOG
: Get COG annotations of sequences
in codonTable
object.
setCOG
: Set COG annotations
for codonTable
object.
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.
# 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