regionMatch: Given two data frames with columns "chr", "start", and "end",...

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

Description

Given two data frames with columns "chr", "start", and "end", identify the nearest region in one (object2) to the other (object1).

Usage

1
regionMatch(object1, object2, verbose=TRUE)

Arguments

object1

Data frame with columns "chr", "start", and "end". For each of the rows of this data frame, find the nearest regions in object2.

object2

Data frame with columns "chr", "start", and "end".

verbose

print progress.

Details

Given two data frames with columns "chr", "start", and "end", identify the nearest region in one (object2) to the other (object1).

Value

A data frame with one row corresponding for each row of object1, and columns:

dist

bp separating the region in object1 and the nearest region in object2

matchIndex

row index of object2 for the region that is closest to the region in object1

type

"inside" if nearest region in object2 is wholly contained inside the region in object 1, "cover" if nearest region in object2 covers the whole region in object1, "disjoint" if there is no overlap between the region in object1 and the nearest region in object1, and "overlap" if the region in object1 and the nearest region in object2 overlap but one does not wholly cover the other.

amountOverlap

amount of overlap between the region in object1 and the nearest region in object2

insideDist

for type="inside" regions, the smaller (fewest bp) of 1., the end position of region in object1 - the end position of the nearest region in object2, and 2., the start position of region in object1 - the start position of the nearest region in object2.

size1

number of bp in region in object1

size2

number of bp in nearest region in object2

Author(s)

Martin Aryee <aryee@jhu.edu>, Peter Murakami, Rafael Irizarry

See Also

dmrFind, plotDMRs, plotRegions

Examples

1
# See qval

charm documentation built on May 6, 2019, 2:29 a.m.