find number of overlaps between segments

630
3
05-16-2014 12:41 AM
jyothisane
New Contributor
Hi

I have two files

File1
68  310

File2
61 64
159 162
169 172
113 116
252 255
266 269
271 274
290 293

could you please help me to calculate overlap of region from file1 and file2

Thanks in advance

Jyothi
Tags (2)
0 Kudos
3 Replies
DuncanHornby
MVP Notable Contributor
What do you mean by overlap, you do not explain what these numbers represent? Are they ID's or some sort of measurement?
0 Kudos
jyothisane
New Contributor
What do you mean by overlap, you do not explain what these numbers represent? Are they ID's or some sort of measurement?


numbers indicate start and end position of DNA sequence.
let us say

File 1
start  end
1       2
3       6

File 2
start  end
0        1
1        5

have  total overlap of 3 at positions 1,3,4  (end exclusiveness, end positions are not included)
0 Kudos
Zeke
by
Regular Contributor III
This forum is about using python for ArcGIS, a geographic information application. It's not a general python forum. You may want to try stackoverflow.com or google for more general, or perhaps specific to biology, python forums.
0 Kudos