bedtools2 icon indicating copy to clipboard operation
bedtools2 copied to clipboard

v2.29.2: truncated bam output using bedpetobam

Open daler opened this issue 5 years ago • 4 comments

I'm making sure the pybedtools tests work with bedtools v2.29.2, and I'm seeing the following issue. It's been a while since I've updated the tests, so this may not be something that just popped up.

$ bedtools --version
bedtools v2.29.2
# bedpe.bed
chr1    100     200     chr5    5000    5100    bedpe_example1  30      +       -
chr9    1000    5000    chr9    3000    3800    bedpe_example2  100     -       -
# chromsizes
chr1    249250621
chr9    141213431
bedtools bedpetobam -i bedpe.bed -g chromsizes | samtools view

results in:

[main_samview] truncated file.

It seems to be specific to that tool, since bedtobam works fine:

cut -f1-3,7 bedpe.bed > a.bed
bedtools bedtobam -i a.bed -g chromsizes | samtools view
bedpe_example1  0       chr1    101     255     100M    *       0       0       *       *
bedpe_example2  0       chr9    1001    255     4000M   *       0       0       *       *

daler avatar Dec 22 '19 15:12 daler

This is a repeat of https://github.com/arq5x/bedtools2/issues/762#issuecomment-528844731; unfortunately it seems that the SaveAlignment patch in https://github.com/arq5x/bedtools2/issues/762#issuecomment-528900976 never got applied.

jmarshall avatar Dec 22 '19 18:12 jmarshall

having the same problem here

YichaoOU avatar Jul 06 '20 08:07 YichaoOU

Hello It would be really great if this could be fixed, as I am having the same issue, with bedpetobam generating truncated bam files (with proper header though). Or if anyone knows of a workaround, that would be also helpful. Thanks Alex

AlexBlais74 avatar Oct 21 '21 12:10 AlexBlais74

Hi there, I verified this problem has been fixed since 2.30.0. Please do not use 2.29.2 which is broken.

Please note, version 2.30.0 is the first release with the fix #762.

Please let me know if you have any question.

38 avatar Oct 21 '21 23:10 38