Learn R Programming

MEDIPS (version 1.22.0)

MEDIPS.selectROIs: Selects row-wise subsets of a result table as returned by the MEDIPS.meth function.

Description

MEDIPS provides the functionality to select subsets of the result matrix returned by the MEDIPS.meth function according to any given set of regions of interest (ROIs).

Usage

MEDIPS.selectROIs(results=NULL, rois=NULL, columns=NULL, summarize=NULL)

Arguments

results
a result table as returned by the function MEDIPS.meth
rois
A matrix containing genomic coordinates of any regions of interest.
columns
Only selected columns will be returned as determined by the columns parameter. It is possible to specify one or more concrete column names, please see an example below.
summarize
By setting summarize=NULL (default) all windows included in the genomic ranges of the given ROIs will be returned. As an alternative, it is possible to calculate mean (summarize = "avg") or sum (summarize = "sum") values over the individual windows included in each ROI, or to select only the most significant window within each given ROI (summarize="minP").

Examples

Run this code

library(MEDIPSData)
data(resultTable)

rois=data.frame(chr=c("chr22","chr22"), start=c(19136001, 19753401), stop=c(19136200, 19753500), ID=c("ID_1", "ID_2"))
columns=names(resultTable)[grep("counts|rpkm|logFC",names(resultTable))]
s = MEDIPS.selectROIs(results=resultTable, rois=rois, columns=columns, summarize=NULL)


Run the code above in your browser using DataLab