terminate called after throwing an instance of 'BamTools::Internal::BamException'

55 views
Skip to first unread message

Shruti Srivastava

unread,
Sep 3, 2020, 10:14:41 AM9/3/20
to bedtools-discuss
Hi,
I am using bedtools coverage to get the the coverage of the feature in my bed file when search against my bam file generated by Dragen pipeline for WG methylation seq. The outputs is Bismark generated bam file.

I have already ran the following command on one of my samples successfully:
$ bedtools coverage -abam ALS3_793_hg19/ALS3.sorted.bam -b ALS3_793_hg19/ALS3_CG.bed -hist > ALS3_793_hg19/ALS3_cpg_cov.txt

But now I am encountering the following error when i am running the other samples:
$ bedtools coverage -abam ALS6_798_hg19/ALS6.sorted.bam -b ALS6_798_hg19/ALS6_CG.bed -hist > ALS6_798_hg19/ALS6_cpg_cov.txt
terminate called after throwing an instance of 'BamTools::Internal::BamException'
  what():  BgzfStream::InflateBlock: zlib inflate failed
Aborted (core dumped)

Will appreciate your help in resolving this error,
Thanks 
Shruti


Message has been deleted

Aaron Quinlan

unread,
Sep 7, 2020, 2:58:12 PM9/7/20
to bedtools...@googlegroups.com
Hi Shruti,

Have you tried running samtools stats (or the like) on the BAM to make sure it is not corrupt?

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/a00b5777-4039-446c-8dd6-4a2297a66648n%40googlegroups.com.

Shruti Srivastava

unread,
Sep 8, 2020, 10:19:18 AM9/8/20
to bedtools...@googlegroups.com
Thanks, Aaron, yes it was a problem in the bam file it was truncated. I generated again and ran coverageBed on it without any trouble this time.

Shruti Srivastava, B.Tech., MSc
Bioinformatician
Atlantic Cancer Research Institute
Moncton, Canada
Contact no. +1 (778)-710-7937


You received this message because you are subscribed to a topic in the Google Groups "bedtools-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bedtools-discuss/XGW1cxm1170/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bedtools-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bedtools-discuss/7D154425-E4BB-49EA-BC5E-BBE3E32D5307%40gmail.com.
Reply all
Reply to author
Forward
0 new messages