Description Usage Arguments Details Value Author(s) Examples
Overlaps query ranges with reference ranges. The function assumes that there is no overlap between reference ranges.
1 | overlap(qry, ref)
|
qry |
data.frame with query ranges. qry should have columns 'id','start' and 'end'. The routine assumes that the table is ascending sorted by column 'start'. |
ref |
data.frame with reference ranges. ref should have columns 'id','start' and 'end'. The routine assumes that the table is ascending sorted by column 'start'. |
The routine assumes that qry and ref tables are ascending sorted by column 'start'. Otherwise the result will be incorrect (i.e. missing hits). The function assumes that there is no overlap between reference ranges. It will otherwise return only one, possibly arbitrary, hit per query range.
The function returns a data.frame
overlap |
Factor which encodes type of overlap between query and reference range. Levels no (no overlap; refid is set to 0), l (qry left overhangs ref), n (qry is contained in ref ), r (qry right overhangs ref) |
leftDiff |
Distance on left side between margins of query and reference. |
rightDiff |
Distance on right side between margins of query and reference. |
queryid |
id from qry table. |
refid |
id from ref table. |
Wolfgang Kaisers
1 2 3 |
Loading required package: doBy
Loading required package: RSQLite
overlap leftDiff rightDiff queryid refid
0 no 0 5 1 0
1 l 2 3 2 1
2 n 1 2 3 3
3 b 2 2 4 4
4 r 2 5 5 4
5 no 5 0 6 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.