crossTab-class {coRdon} | R Documentation |
crossTab
Contingency table of sequences' annotations and the corresponding numeric values.
crossTab(sequences, variable, threshold = 1L, percentiles = NULL) ## S4 method for signature 'character,numeric' crossTab(sequences, variable, threshold = 1L, percentiles = NULL) getSeqAnnot(x) ## S4 method for signature 'crossTab' getSeqAnnot(x) getVariable(x) ## S4 method for signature 'crossTab' getVariable(x) contable(x) ## S4 method for signature 'crossTab' contable(x)
sequences |
Character vector of sequences' annotations (KO, COG). |
variable |
Numeric vector of the coresponding CU values. |
threshold |
A threshold value (or a vector of values) of the variable.
Sequences with value of the given variable greater than threshold are
taken as a subset. Default is 1. If no threshold should be set, specify
|
percentiles |
A single value or a vector of values between 0 and 1.
Sequences with value of the given variable in the top percentiles are
taken as a subset. If no percentiles should be specified, the argument
takes the value |
x |
A |
Returns a crossTab
object with category values in rows, and
with separate columns for counts in background (all) and subsets, i.e.
for diferrent thresholds/percentiles provided.
crossTab
: Create a contingency table for the set of annotated
sequences and the corresponding codon usage (CU) values.
getSeqAnnot
: Get sequence annotations from crossTab
object.
getVariable
: Get values of the variable used to create contingency
table in crossTab
object.
contable
: Get contingency table from crossTab
object.
sequences
Character vector of sequences annotations.
variable
Numeric vector of the coresponding CU values.
table
Contingecy table.
set.seed(5491) s <- sample(LETTERS[1:3], 10, replace = TRUE) v <- sample(1:5, 10, replace = TRUE) crossTab(s, v) crossTab(s, v, threshold = c(3,5)) crossTab(s, v, threshold = NULL, percentiles = c(0.5, 0.3)) ct <- crossTab(s, v) contable(ct) getSeqAnnot(ct) getVariable(ct)