stateBrewer {chromstaR} | R Documentation

## Obtain combinatorial states from experiment table

### Description

This function computes combinatorial states from an `experiment.table`.

### Usage

    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

    ## 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)

[Package chromstaR version 1.13.0 Index]