I have files a.bed
and b.bed
a.bed
chr1 10 20 geneA
chr1 30 40 geneB
b.bed
chr1 5 15 geneA
chr1 10 25 geneB
if I intersectbed
those files I will obtain:
chr1 10 15 geneA
chr1 10 20 geneA
But I would like the name
column to match between files so that i will obtain:
chr1 10 15 geneA
If name column does not match, I don't want to output the intersection. I can't find any option in intersectbed to "force identical name", any suggestions?