twolinin / longphase

GNU General Public License v3.0
102 stars 9 forks source link

terminate called after throwing an instance of 'std::out_of_range' #17

Open MichelMoser opened 2 years ago

MichelMoser commented 2 years ago

Dear longphase-developers,

I run into some troubles with one of my phasing runs. Previous files ran fine, but it seems to struggle at a particular contig. When looking into the vcf file for the contig, it looks fine to me.

Stderr:

..
parsing contig/chromosome: SimonFlye27_15K_contig_02541 ... fetch SNP ... filter SNP ... run algorithm ... 2s
parsing contig/chromosome: SimonFlye27_15K_contig_02542 ... fetch SNP ... filter SNP ... run algorithm ... 1s
parsing contig/chromosome: SimonFlye27_15K_contig_02545 ... fetch SNP ... filter SNP ... run algorithm ... 2s
parsing contig/chromosome: SimonFlye27_15K_contig_02546 ... fetch SNP ... filter SNP ... run algorithm ... 2s
parsing contig/chromosome: SimonFlye27_15K_contig_02548 ... fetch SNP ... filter SNP ... run algorithm ... 2s
parsing contig/chromosome: SimonFlye27_15K_contig_02550 ... fetch SNP ... filter SNP ... run algorithm ... 2s
parsing contig/chromosome: SimonFlye27_15K_contig_02553 ... fetch SNP ... filter SNP ... run algorithm ... 2s
parsing contig/chromosome: SimonFlye27_15K_contig_02554 ... fetch SNP ... filter SNP ... run algorithm ... 2s
parsing contig/chromosome: SimonFlye27_15K_contig_02556 ... fetch SNP ... filter SNP ... run algorithm ... 2s
parsing contig/chromosome: SimonFlye27_15K_contig_02559 ... fetch SNP ... filter SNP ... run algorithm ... 2s
parsing contig/chromosome: SimonFlye27_15K_contig_02561 ... fetch SNP ... filter SNP ... terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::at: __n (which is 18446744073709551615) >= this->size() (which is 4036)
/var/tmp/slurmd/job14421658/slurm_script: line 39: 12958 Aborted                 /net/fs-1/home01/michelmo/tools/longphase_linux-x64 phase -b $BAM --ont -o $OUT -r $REF --sv-file=$SV_VCF --snp-file=$SNP_VCF -t $CPUS
Wed Jun  8 11:35:03 CEST 2022
runtime 5870

SNP_VCF

SimonFlye27_15K_contig_02561    4       .       G       A       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    19      .       T       C       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    23      .       T       C       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    98      .       G       T       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    133     .       C       G       .       PASS    .       GT:GL:GQ        0/0:-0.0992291,-0.689859,-4.68986:7
SimonFlye27_15K_contig_02561    158     .       T       C       .       PASS    .       GT:GL:GQ        0/0:-0.0992291,-0.689859,-4.68986:7
SimonFlye27_15K_contig_02561    166     .       T       C       .       PASS    .       GT:GL:GQ        0/0:-0.0992291,-0.689859,-4.68986:7
SimonFlye27_15K_contig_02561    167     .       G       A       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    178     .       C       G       .       PASS    .       GT:GL:GQ        0/0:-0.0992291,-0.689859,-4.68986:7
SimonFlye27_15K_contig_02561    192     .       A       C       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    194     .       G       A       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    205     .       C       T       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    223     .       G       C       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    256     .       A       G       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    271     .       G       A       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    342     .       T       A       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    343     .       A       C       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    530     .       G       T       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    551     .       G       T       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    598     .       A       G       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    612     .       T       C       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    713     .       A       C       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    1472    .       C       T       .       PASS    .       GT:GL:GQ        .:-0.477121,-0.477121,-0.477121:.
SimonFlye27_15K_contig_02561    1521    .       C       A       .       PASS    .       GT:GL:GQ        0/0:-0.0992291,-0.689859,-4.68986:7
SimonFlye27_15K_contig_02561    1709    .       G       A       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    1801    .       C       G       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    1996    .       C       T       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    1999    .       A       C       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2061    .       T       C       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2119    .       T       C       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2122    .       T       C       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2152    .       G       T       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2153    .       G       A       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2297    .       T       C       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2331    .       C       T       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2448    .       T       C       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2449    .       A       C       .       PASS    .       GT:GL:GQ        0/0:-0.0992291,-0.689859,-4.68986:7
SimonFlye27_15K_contig_02561    2456    .       C       T       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2457    .       G       A       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2458    .       G       A       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2498    .       T       G       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2524    .       C       A       .       PASS    .       GT:GL:GQ        .:-0.477121,-0.477121,-0.477121:.
SimonFlye27_15K_contig_02561    2537    .       G       A       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2538    .       T       G       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2641    .       G       A       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2642    .       C       A       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2672    .       T       C       .       PASS    .       GT:GL:GQ        0/0:-0.000114312,-3.57975,-9.18137:36
SimonFlye27_15K_contig_02561    2681    .       C       T       .       PASS    .       GT:GL:GQ        0/0:-0.000114312,-3.57975,-9.18137:36
SimonFlye27_15K_contig_02561    2828    .       A       C       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2829    .       G       C       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    2955    .       A       T       .       PASS    .       GT:GL:GQ        0/0:-0.0992291,-0.689859,-4.68986:7
SimonFlye27_15K_contig_02561    3006    .       A       G       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    3007    .       A       C       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    3116    .       G       C       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    3190    .       T       A       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    3202    .       C       A       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    3265    .       C       T       .       PASS    .       GT:GL:GQ        0/0:-0.000114312,-3.57975,-9.18137:36
SimonFlye27_15K_contig_02561    3325    .       C       T       .       PASS    .       GT:GL:GQ        0/0:-0.000114312,-3.57975,-9.18137:36
SimonFlye27_15K_contig_02561    3566    .       T       A       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    3742    .       T       C       .       PASS    .       GT:GL:GQ        0/0:-0.000114312,-3.57975,-9.18137:36
SimonFlye27_15K_contig_02561    4031    .       A       C       .       PASS    .       GT:GL:GQ        1/0:-3.7097,-0.000169511,-3.7097:34
SimonFlye27_15K_contig_02561    4078    .       A       C       .       PASS    .       GT:GL:GQ        1/1:-4.68986,-0.689859,-0.0992291:7

using longphase version 1.2

I could just remove the contig to continue, but thought it would be nice to fix the bug.

Best, Michel

twolinin commented 2 years ago

Hi @MichelMoser

Thanks for your report. I will find the problem as soon as possible. In order to fix this problem faster I want to confirm the length of SimonFlye27_15K_contig_02561. Or you can provide fasta, bam and vcf files directly if you don't mind.

Thanks

MichelMoser commented 2 years ago

Hi @twolinin , Thank you for the quick response. contig length is 4123 bp. I try and make a reproducible subsample for you.