BioInf-Wuerzburg / proovread

PacBio hybrid error correction through iterative short read consensus
MIT License
60 stars 20 forks source link

bam2cns unexpectedly returned (command calling samtools) #112

Closed RaulGoch closed 7 years ago

RaulGoch commented 7 years ago

Hi there,

I have been trying to use proovread to correct PacBio subreads with short Illumina reads using this command:

proovread -l PacBio_subreads.fastq -s short_reads1.fastq -s short_reads2.fastq ... -s short_reads12.fastq -p /path/to/output -t 36 --coverage=90

However, the program crashes while running bam2cns. In the stderr file the last command appears interrupted by samtools. Here the last bit of the stderr:

[Fri Oct 6 21:23:54 2017] Batch 109/402 perl -I/opt/Modules/proovread/2.14.1/bin/../lib/ /opt/Modules/proovread/2.14.1/\ bin/bam2cns --append 1 --bam CCMP2592/bwa-sr-1/CCMP2592.bam --bin-size 20 --cov\ erage 11.25 --ignore-weak-reads 0 --mask-weak-reads 0 --max-ins-length 0 --max-\ ref-seqs 100 --prefix CCMP2592/bwa-sr-1/CCMP2592.108 --qv-offset 33 --ref CCMP2\ 592/ccs-1/CCMP2592.fq --ref-offset 206598016 [Fri Oct 6 21:23:56 2017] Batch 110/402 perl -I/opt/Modules/proovread/2.14.1/bin/../lib/ /opt/Modules/proovread/2.14.1/\ bin/bam2cns --append 1 --bam samtools: /opt/pkg/latest/lib/libz.so.1: no versio\ n information available (required by samtools)

------------------------------------------------------------------------------

CCMP2592/bwa-sr-1/CCMP2592.bam --bin-size samtools: /opt/pkg/latest/lib/libz.so\ .1: no version information available (required by samtools)

------------------------------------------------------------------------------

[Fri Oct 6 21:23:56 2017] bam2cns unexpectedly returned Exited at 'main' '/opt/Modules/proovread/2.14.1//bin/proovread', line 1636 Last call 'main::correct_sr_mt' '/opt/Modules/proovread/2.14.1//bin/proovread', line 868

I checked the file from which proovread is reading the commands (bwa-sr-1/*.cmds) and everything seems in order. Here a part including the failing command:

--append 1 --bam CCMP2592/bwa-sr-1/CCMP2592.bam --bin-size 20 --coverage 11.25 --ignore-weak-reads 0 --mask-weak-reads 0 --max-ins-length 0 --max-ref-seqs 100 --prefix CCMP2592/bwa-sr-1/CCMP2592.107 --qv-offset 33 --ref CCMP2592/cc s-1/CCMP2592.fq --ref-offset 204900393 --append 1 --bam CCMP2592/bwa-sr-1/CCMP2592.bam --bin-size 20 --coverage 11.25 --ignore-weak-reads 0 --mask-weak-reads 0 --max-ins-length 0 --max-ref-seqs 100 --prefix CCMP2592/bwa-sr-1/CCMP2592.108 --qv-offset 33 --ref CCMP2592/ccs-1/CCMP2592.fq --ref-offset 206598016 > --append 1 --bam CCMP2592/bwa-sr-1/CCMP2592.bam --bin-size 20 --coverage 11.25 --ignore-weak-reads 0 --mask-weak-reads 0 --max-ins-length 0 --max-ref-seqs 100 --prefix CCMP2592/bwa-sr-1/CCMP2592.109 --qv-offset 33 --ref CCMP2592/ccs-1/CCMP2592.fq --ref-offset 208705358 --append 1 --bam CCMP2592/bwa-sr-1/CCMP2592.bam --bin-size 20 --coverage 11.25 --ignore-weak-reads 0 --mask-weak-reads 0 --max-ins-length 0 --max-ref-seqs 100 --prefix CCMP2592/bwa-sr-1/CCMP2592.110 --qv-offset 33 --ref CCMP2592/ccs-1/CCMP2592.fq --ref-offset 210698911 --append 1 --bam CCMP2592/bwa-sr-1/CCMP2592.bam --bin-size 20 --coverage 11.25 --ignore-weak-reads 0 --mask-weak-reads 0 --max-ins-length 0 --max-ref-seqs 100 --prefix CCMP2592/bwa-sr-1/CCMP2592.111 --qv-offset 33 --ref CCMP2592/ccs-1/CCMP2592.fq --ref-offset 212233978

Any idea of what is happening?

thackl commented 7 years ago

It seems to be a samtools error:

samtools: /opt/pkg/latest/lib/libz.so.1: no version information available (required by samtools)
samtools: /opt/pkg/latest/lib/libz.so.1: no version information available (required by samtools)

Can you try run samtools directly? It seems like it hasn't been installed properly...

stetner commented 7 years ago

I am a sysadmin for the system and the libz error is a non-issue caused by the version of zlib installed by pkgsrc. It is possible that the output to stderr is causing the bam2cns process to fail though, so I will see what can be done to work around that.

thackl commented 7 years ago

You are right, it's the error in stderr that causes bam2cns to exit. I've uploaded a branch with a quick fix - it should ignore this particular zlib error in the stderr output:

https://github.com/BioInf-Wuerzburg/proovread/tree/hotfix/ignore-zlib-error

Should be enough to got to the proovread install directory and run

git pull
git checkout hotfix/ignore-zlib-error
stetner commented 7 years ago

Thanks Thomas, I am having Raul try to change the LD_LIBRARY_PATH first to pick up the system libz, as long as that does not break something else.

I will then test the hotfix and get back to you....

Doug

stetner commented 7 years ago

Just reporting back that the fix worked for the user. Thanks!

Doug

thackl commented 7 years ago

Great, thanks!