luntergroup / octopus

Bayesian haplotype-based mutation calling
MIT License
300 stars 37 forks source link

Terminate called after throwing an instance of 'std::out_of_range' #62

Closed iamh2o closed 4 years ago

iamh2o commented 5 years ago

Describe the bug I am running octopus on ~40x coverage WGS NA12878 data. I am aligning to hs38(including all additional contigs). Octopus ran for ~20hrs before crashing with:

terminate called after throwing an instance of 'std::out_of_range' what(): ContigRegion: expanded past contig start

Command Command line to run octopus:

octopus --reference /mnt/disks/data5/data/reference/human/hs38DH/hs38DH.fa --reads NA12878.gatk4-deduped.sort.bam -t regions.bed --forest-file /mnt/disks/data5/data/reference/human/germline.v0.6.3-beta.forest -o NA12878.octopus.vcf.gz  --threads 96 --annotations AD ADP AF ARF BQ CRF DP FRF GC GQ MC MF MQ MQ0 QD QUAL SB STR_LENGTH STR_PERIOD  &> logs/octopus.NA12878.log

Desktop (please complete the following information):

Additional context This is the final output of octopus:

[2019-04-26 00:39:05] chr22:42685392 89.1% 1h 15m 9m 8s [2019-04-26 00:39:54] chrX:24040661 90.1% 1h 16m 8m 17s [2019-04-26 00:40:27] chrX:56215526 91.1% 1h 16m 7m 24s [2019-04-26 00:40:47] chrX:88389189 92.1% 1h 16m 6m 31s [2019-04-26 00:41:28] chrX:120563436 93.1% 1h 17m 5m 40s [2019-04-26 00:41:49] chrX:152737049 94.1% 1h 17m 4m 48s [2019-04-26 00:42:09] chrY:56707223 96.0% 1h 18m 3m 16s [2019-04-26 00:44:35] chr15_KI270905v1_alt:1840138 97.0% 1h 20m 2m 25s terminate called after throwing an instance of 'std::out_of_range' what(): ContigRegion: expanded past contig start

iamh2o commented 5 years ago

I am attempting to re-run with only chr1-22,X,Y,M. and will report back.

dancooke commented 5 years ago

Thanks for the bug report. Probably Octopus is struggling in one of the non-primary contigs. Please let me know how the primary-only run goes and I'll investigate from there.

iamh2o commented 5 years ago

I ran with chr1-22,X,Y,M and things completed in 3h45m. For the curious, a NA12878 38x coverage noamp 600bp insert 150 paired end ILMN assembly with BWAmem.
F-Score of 99.83 out of the box :-)

dancooke commented 5 years ago

Just testing the fix in cb7099b0eca5ea0fe28d240232a8db1ecdbe012b (I didn't realise the comment in the commit would close the issue!). Will re-open if tests fail.

DBS-Max commented 4 years ago

I am running into this error aswell on current develop branch (built the container a couple hours ago)

[2019-12-10 20:14:20] <INFO>   chr8_KI270816v1_alt:117183            97.0%          25m 17s               47s
[2019-12-10 20:14:21] <INFO>    chr8_KI270900v1_alt:91807            98.0%          25m 19s               31s
[2019-12-10 20:14:22] <INFO>  chr6_GL000256v2_alt:2358173            99.0%          25m 20s               15s
terminate called after throwing an instance of 'std::out_of_range'
  what():  ContigRegion: expanded past contig start
/data/nextflow_temp/cf/a16b7beb668a273a3bd5bbe22c07f4/.command.sh: line 8:    26 Aborted                 (core dumped) octopus -R Homo_sapiens_assembly38.fasta -I 0_NA12878.bam -o 0_NA12878.bcf --sequence-error-model PCR-FREE.NOVASEQ --forest ~/octopus/resources/forests/germline.v0.6.3-beta.forest --threads 16
dancooke commented 4 years ago

@DBS-Max Could you re-run your command but using --threads 1 and --debug. Then post the last 20 or so lines of the debug log that's generated (octopus_debug.log) after failure?

DBS-Max commented 4 years ago

I will try and get around to that soon. I fixed the problem (for me) by supplying an intervals file to -t

dancooke commented 4 years ago

I cannot reproduce this. Will re-open if I can, or anyone can provide a test case.