arq5x / bedtools2

bedtools - the swiss army knife for genome arithmetic
MIT License
941 stars 287 forks source link

Bedtools Genomecov -pc Option: Name-Sorted BAM File Error in Version 2.31.0 #1108

Open yeeun3712 opened 1 week ago

yeeun3712 commented 1 week ago

I understand that the -pc option of genomecov requires a BAM file that is name-sorted. However, I am using bedtools version 2.31.0, and I encounter the following error when using a name-sorted BAM file with the -pc option: Input error: Chromosome chr9 found in non-sequential lines. This suggests that the input file is not sorted correctly.

On the other hand, using a position-sorted BAM file does not produce any errors, and it seems to work fine.

Is this issue related to the bedtools version? Additionally, does using a position-sorted BAM file instead of a name-sorted BAM file produce the same results when using the -pc option in this version?