crossTab-class: An S4 class 'crossTab'

Description Usage Arguments Value Methods (by generic) Slots Examples

Description

Contingency table of sequences' annotations and the corresponding numeric values.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
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)

Arguments

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 threshold = NULL

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

x

A crossTab object.

Value

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.

Methods (by generic)

Slots

sequences

Character vector of sequences annotations.

variable

Numeric vector of the coresponding CU values.

table

Contingecy table.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)

BioinfoHR/coRdon documentation built on May 6, 2019, 8:35 p.m.