[R] how to merge distance data based on location
Matthew Keller
mckellercran at gmail.com
Fri Aug 19 19:15:39 CEST 2011
Hi all,
I have two data frames, two columns each, 1000s of rows. Each row
represents a segment of the genome where a deletion has occurred.
First column is start position of the deletion in genomic distance,
second is end position.
So, e.g., first 3 rows of data frame A is:
1003 1023
5932 6120
12348 12689
first 3 rows of data frame B is:
852 5305
1010 1015
8500 9500
10000 13000
I want to merge based on distance, such that each row will be
deletions that overlap. So I'd like:
1003 1023 852 5305 1010 1015
5932 6120
8500 9500
12348 12689 10000 13000
Does anyone have ideas about how to accomplish this?
Thank you,
Matthew Keller
--
Matthew C Keller
Asst. Professor of Psychology
University of Colorado at Boulder
www.matthewckeller.com
More information about the R-help
mailing list