I have a huge Blast output of the results like this:
1.83155e-63 24679461 24680333
7.37596e-64 24679455 24680312
9.14344e-65 24679455 24680333
6.86568e-72 24679455 24680333
6.45089e-69 24679455 24680333
4.49086e-56 24679455 24680312
1.78896e-52 35167152 35167547
2.57611e-51 35167209 35167547
The first column is e-value, second one is start of the match and third one is the end. Now I need to only choose the ones that don't overlap and if some are overlapping I need to choose only extremes. For example:
8:25
10:20
7:24
30:50
The results would be:
7:25
30:50
Thank you for any help!
An FYI..I don't know if Biostars messed it up; however your code doesn't work as posted. Your
for r in input:
for loop isn't indented correctly. And even when that is fixed, the output printed is just the last range.Might be fine on your end and this was all caused by formatting.
I think it should be working now.
I see it was definitely mis-indented earlier. Thought it was worth pointing out as I didn't want you to come back here later and find it not working.