This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bedtools intersect with minimum overlap required as a number

Hello all.

I have 3 column bed files (chrom, chromStart, chromEnd). I am looking to run bedtools intersect to determine which results are conserved between multiple files.

The constraint is that I want it to only consider overlaps of 20 or more base pairs. All tools in the bedtools suite I have seen only offer to restrict the minimum overlap as a proportion of the first file.

Do any of you know of any tool in the bedtools suite that offers this restriction by quantity instead of proportion, or includes a printout of how much overlap there is, so that I can discriminate the results afterwards?

Thanks!

bedtools intersect

1 answer

bedtools intersect -wo does exactly what you want ("write the original A and B entries plus the number of base pairs of overlap"), please read documentation :-/

Thanks for the help. I read the documentation many times, but apparently not closely enough.

Log in to answer this question.