luntergroup / octopus

Bayesian haplotype-based mutation calling
MIT License
302 stars 38 forks source link

<EROR> Haplotype::copy unsorted or overlapping regions provided #125

Closed bredelings closed 4 years ago

bredelings commented 4 years ago

Describe the bug

octopus hangs with the following error:

[2020-05-21 21:15:02] <INFO> NODE_824_length_10236_cov_9.492962:5712           73.3%           11m 9s             4m 4s
[2020-05-21 21:15:17] <INFO> NODE_850_length_9965_cov_14.760012:7511           74.3%          11m 24s            3m 57s
[2020-05-21 21:15:26] <EROR> Encountered a problem whilst calling NODE_862_length_9817_cov_44.884908:0-9817(Haplotype::copy unsorted or overlapping regions provided)
[2020-05-21 21:15:30] <INFO> NODE_695_length_12274_cov_25.887595:6790          75.3%          11m 37s  

Is it possible to make octopus quit after fatal errors? Right now it seems that octopus will run forever after an EROR, but it won't write any more output.

Version

$ octopus --version
octopus version 0.7.0 (develop ba99b500)
Target: x86_64 Linux 2.6.32-642.13.1.el6.x86_64
SIMD extension: SSE2
Compiler: GNU 9.1.1
Boost: 1_73

Command line to run octopus:

$ octopus -R contigs-1k+.fasta -I contigs-1k+.bam -o contigs-1k+.P2.g.vcf.gz --threads 32 --filter-expression "QUAL < 10 | MQ < 10 | MP < 10 | AF < 0.05 | SB > 0.98 | BQ < 15 | DP < 1 | AD < 1 --annotations AD --bamout contigs-1k+.P2.bam --bamout-type FULL"

Files: NODE_862.tar.gz

dancooke commented 4 years ago

The error appears to be the same as you reported in https://github.com/luntergroup/octopus/issues/121 and was fixed in 2bde043330a2f2c36fcca958e7fa6887653d88ab. You're using version ba99b500 here (i.e. before the fix). I tried your input data with 2bde043330a2f2c36fcca958e7fa6887653d88ab and it ran successfully.

Regarding the problem with hanging after an exception, this has long been a problem that I've never managed to resolve. It comes about when a std::future task throws the exception, but then when std::future::get is called, the exception isn't propagated. I've never managed to get a minimal working example to report as a self-contained bug, which makes me think my C++ code could be resulting in undefined behaviour, but I can't see where...