stateBrewer: Obtain combinatorial states from experiment table

Description Usage Arguments Details Value Author(s) Examples

View source: R/stateBrewer.R

Description

This function computes combinatorial states from an experiment.table.

Usage

1
2
3
4
5
6
7
8
stateBrewer(
  experiment.table,
  mode,
  differential.states = FALSE,
  common.states = FALSE,
  exclusive.table = NULL,
  binary.matrix = NULL
)

Arguments

experiment.table

A data.frame specifying the experiment structure. See experiment.table.

mode

Mode of brewing. See Chromstar for a description of the parameter.

differential.states

A logical specifying whether differential states shall be returned.

common.states

A logical specifying whether common states shall be returned.

exclusive.table

A data.frame or tab-separated text file with columns 'mark' and 'group'. Histone marks with the same group will be treated as mutually exclusive.

binary.matrix

A logical matrix produced by dec2bin. If this is specified, only states specified by the rows of this matrix will be considered. The number of columns must match length(replicates) or length(statespec). Only for advanced use. No error handling for incorrect input.

Details

The binary modification state (unmodified=0 or modified=1) of multiple ChIP-seq samples defines a (decimal) combinatorial state such as:

sample1 sample2 sample3 sample4 sample5 combinatorial state
bin1 0 0 1 0 0 4
bin2 0 0 0 0 0 0
bin3 0 1 0 1 0 10
bin4 0 1 1 1 1 15
bin5 0 0 1 0 1 5

Value

A data.frame with combinations and their corresponding (decimal) combinatorial states.

Author(s)

Aaron Taudt

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Construct an experiment table
data(experiment_table)
print(experiment_table)
## Construct combinatorial states
stateBrewer(experiment_table, mode='combinatorial')
stateBrewer(experiment_table, mode='differential')
stateBrewer(experiment_table, mode='full', common.states=TRUE)

## Exclude states with exclusive.table
excl <- data.frame(mark=c('H3K4me3','H3K27me3'),
                             group=c(1,1))
stateBrewer(experiment_table, mode='full', exclusive.table=excl)

chromstaR documentation built on Nov. 8, 2020, 8:29 p.m.