deepTools
deepTools copied to clipboard
deepTools reports it cannot find an existing file, if it is truncated
This issue has some similarity to other reports of a BAM file being reported to not exist, when it does.
Here is an example of this error:
bamCompare -b1 SRR3705515-abra2.bam -b2 SRR3705515.bam -o log2ratio.bw
Reports:
The file 'SRR3705515-abra2.bam' does not exist
This BAM file is truncated, as reported via SAMtools:
samtools flagstat SRR3705515-abra2.bam
[W::bam_hdr_read] EOF marker is absent. The input is probably truncated
Use of non-truncated BAM files does not cause this error. This error also appears, with at least bamCoverage.
It would be useful if deepTools instead output an informative error message, like SAMtools. It would also be nice if there was a way to ignore this error, and merely output a truncation warning.
deeptools --version : 3.5.1
python --version : 2.7.16
python3 --version : 3.9.7
MacBook, with M1 chip; MacOS Big Sur (fuily-updated).
I'm not sure if pysam returns a useful error indicator in this case. Can you check what happens with the following?
python -c "import pysam; bam = pysam.AlignmentFile('SRR3705515-abra2.bam'); print(bam);"
Unfortunately not. Apologies, but I no longer have a truncated BAM file to test with.
Thanks for looking into this!
-- Coby
On Sep 30, 2021, 11:40 AM +0200, Devon Ryan @.***>, wrote:
I'm not sure if pysam returns a useful error indicator in this case. Can you check what happens with the following? python -c "import pysam; bam = pysam.AlignmentFile('SRR3705515-abra2.bam');" — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.