error in bedtools merge

26 views
Skip to first unread message

Y Z

unread,
Aug 3, 2022, 3:34:36 PM8/3/22
to bedtools-discuss
Hi,
I hope this post is not a duplicate post. My last post seems to be gone...

So I have a bed file containing the following two lines:

NC_000962.3     1169440 1169440 92_region_15
NC_000962.3     1169440 1169445 84_region_2

I used 'bedtools merge' to merge these two lines but I got:

NC_000962.3     1169439 1169445

The start is minus one of the original start point. I don't know if I shouldn't allow point in a bed file (as the first line) or this is a bug?

Aaron Quinlan

unread,
Aug 3, 2022, 3:39:08 PM8/3/22
to bedtools...@googlegroups.com

In BED format, start is zero-based, so a single nucleotide would have start 1 less than end. Furthermore, in a zero-based, half-open coordinate system, start==end indicates an insertion between nucleotides.

 

https://www.biostars.org/p/84686/

 

Therefore, the flanking nucleotides are affected. Thus, merge updates the start to reflect that the merger of the two intervals includes that flanking nucleotide.

 

Aaron

--
You received this message because you are subscribed to the Google Groups "bedtools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bedtools-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bedtools-discuss/b3a79597-616b-4923-85bb-00f4b6ab0137n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages