PaintStates: Run a StatePaintR decisionMatrix against a group of files...

Description Usage Arguments Details Value Examples

Description

Run a StatePaintR decisionMatrix against a group of files listed in a manifest.

Usage

1
PaintStates(manifest, decisionMatrix, scoreStates = FALSE, progress = TRUE)

Arguments

manifest

A character vector containing the filename of the manifest file. Alternatively, it can be a data.frame, with the same format as the text manifest. See details for the expected format.

decisionMatrix

An object of class decisionMatrix.

scoreStates

logical; if scores have been specified in the decisionMatrix, should the states be scored?

progress

logical; show progress bar and timing details?

Details

The manifest is a tab delimited file containing five fields; SAMPLE, MARK, SRC, BUILD, and FILE.
'SAMPLE' refers to the sample to which the marks are related, like a cell line, or tissue.
'MARK' refers to the chromatin mark, or other feature described in the decisionMatrix abstractionLayer
'SRC' refers to the source of the data, retained for documentation, but not used in the functions.
'BUILD' refers to the genome build of the data tracks. All tracks under a single sample must be of the same genome build.
'FILE' refers to the location of the file describing the mark. Can be .bed, .narrowPeak, .gappedPeak, etc. Only the first three columns are used, 'chromosome', 'start', and 'end', unless scoreStates = TRUE, in which case a narrowPeak file is required.

Value

A GRangesList, each GRanges object describing the states of all segements for a sample. Each range is described by the fields name indicating the sample, state indicating the state, and optionally score indicating the score of the state. The decisionMatrix and the manifest used to run the segmentation are included in the attributes of the output object.

Examples

1
2
3
4
5
6
7
8
manifest <- system.file("extdata", "manifest.hmec.txt", package = "StatePaintR")
load(system.file("extdata", "poised.promoter.model.rda", package = "StatePaintR"))
states <- PaintStates(manifest = manifest,
                      decisionMatrix = poised.promoter.model,
                      scoreStates = FALSE, progress = FALSE)
states
attributes(states)$manifest
attributes(states)$decisionMatrix

Simon-Coetzee/StatePaintR documentation built on May 9, 2019, 1:31 p.m.