splitByAnnotation: Split data into a list by annotation element.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/Genominator.R

Description

This function splits the data into a list of matrices, by annotation element.

Usage

1
2
3
splitByAnnotation(expData, annoData, what = "*",
  ignoreStrand = FALSE, expand = FALSE, 
  addOverStrands = FALSE, verbose = getOption("verbose"))

Arguments

expData

An object of class ExpData.

annoData

A data frame which must contain the columns chr, start, end and strand which specifies annotation regions of interest.

what

Vector of names of columns of expData to be included in output.

ignoreStrand

Logical indicating whether strand should be ignored. If TRUE, data that falls into the annotation region, regardless of strand, is included.

expand

Logical indicating whether positions with no data should be included in output. If TRUE, lines are added to the output to give a value for each position, even if this value is 0.

addOverStrands

Logical indicating whether data should be added across strands. Only applies when expand is TRUE.

verbose

Logical indicating whether details should be printed.

Details

This function retrieves the data contained in the regions of the annoData object. The return object may be significant in size.

Value

Returns a list of length equal to the number of annotation entries split upon. Each list element is either a matrix of data, or a list with data matrices for each strand included (if expand is TRUE and addOverStrands is FALSE).

Author(s)

James Bullard bullard@berkeley.edu, Kasper Daniel Hansen khansen@jhsph.edu

See Also

See Genominator vignette for more information.

Examples

1
2
3
4
ed <- ExpData(system.file(package = "Genominator", "sample.db"),
              tablename = "raw")
data("yeastAnno")
splitByAnnotation(ed, yeastAnno[1:30,])

Genominator documentation built on Oct. 31, 2019, 8:56 a.m.