mergeWithAnnotation: Combine data with annotation

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

View source: R/Genominator.R

Description

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

Usage

1
2
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 [email protected], Kasper Daniel Hansen [email protected]

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

Genominator documentation built on Nov. 1, 2018, 2:23 a.m.