Entering edit mode
10.9 years ago
raj.karthik437
▴
40
Hi I have 2 files
file1
contig1 10037203 10038203 blah
contig1 10037203 10038203 blah
contig1 10037203 10038203 blah
file2
contig1 997329 938329 blab11
contig1 10037329 10038329 blah11
contig1 10037329 10038329 blah11
I want to get my output as below
contig1 10037203 10038203 blah
contig1 10037203 10038203 blah
contig1 10037203 10038203 blah
contig1 10037329 10038329 blah11
contig1 10037329 10038329 blah11
i,e., if the overlap exists first output all the overlapping ones of file1 and then of file2. Can anybody help me know how to do that?
http://bedtools.readthedocs.org/en/latest/content/example-usage.html
No Pierre, I have already checked with bedtools. It gives
m*n
lines and I don't want that. For example if 3 lines in file 1 overlap with 2 lines in file 2 the output that bedtools produces is3*2=6
lines but I want only 5 - 3 from the first file followed by 2 from the secondYou just need to modify the options,
-w -a -o
to get what you need.