splitByAnnotation {Genominator} | R Documentation

## Split data into a list by annotation element.

### Description

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

### Usage

    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

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

[Package Genominator version 1.36.0 Index]