improve documentation for overlap "return_overlap" argument
Hello,
Thanks for your awesome library. I'm trying to do basepair-level intersection. As I didn't find it in the documentation, I've been doing the following:
In [42]: a
Out[42]:
chrom start end name
0 1 10 13 1:10-13
1 1 14 17 1:14-17
In [43]: b
Out[43]:
chrom start end
0 1 15 25
1 1 30 40
In [44]: bf.subtract(a, bf.complement(b, a)).drop(columns="name")
Out[44]:
chrom start end
0 1 15 17
Does it make sense? Is there a better approach?
Best, Gonzalo
Hi Gonzalo,
Thanks for the kind words!
Would overlap() with how='left', return_overlap=True return what you were looking for?
Let us know if there's any specific places in the docs where it would have been helpful to mention this return argument! (e.g. in https://bioframe.readthedocs.io/en/latest/guide-intervalops.html#overlap or in https://bioframe.readthedocs.io/en/latest/guide-recipes.html)
Thank you, that does return what I was looking for!
Maybe a visualization in https://bioframe.readthedocs.io/en/latest/guide-intervalops.html#overlap could help (though I might be biased from my previous experience with bedtools intersect).
ok! I'll re-open this as an issue for improving documentation