mergeWithAnnotation {Genominator} | R Documentation

## Combine data with annotation

### Description

This function creates a data frame containing the data and the corresponding annotation information for each data row included in the annotation.

### Usage

    mergeWithAnnotation(expData, annoData, what = "*",
      ignoreStrand = FALSE, splitBy = NULL, 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` | Which columns of `expData` to include.
`ignoreStrand` | Logical indicating whether strand should be ignored. If `TRUE`, data from either strand that falls into an annotation region is included.
`splitBy` | Field on which merged data frame should be split before returning.
`verbose` | Logical indicating whether details should be printed.

### Details

Generally this function is good for creating a list of data split by some annotation feature, which can then be applied across.

### Value

If `splitBy` is `NULL`, returns a data frame containing the data from `expData` that fall into regions defined by `annoData`, and which includes the annotation information, with columns as specified by `what`. If `splitBy` is non-`NULL`, returns a list of data frames with an element for each unique value of `splitBy` field.

### 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")
    mergeWithAnnotation(ed, yeastAnno[1:5,])

[Package Genominator version 1.34.0 Index]