This is a test version of Biostars. For the public version, visit https://www.biostars.org.
core dumped in vg pack using gaf file

I am trying to use gaf in vg pack and there are some errors:

error[vg pack] file "./Result/filter/HG002_diploid.pack" cannot be written to terminate called after throwing an instance of 'std::out_of_range' terminate called recursively what(): basic_string::substr: __pos (which is 47) > this->size() (which is 46)

My code for vg giraffe and vg pack:

./vg-1-73 haplotypes -v 0 -t 48 --include-reference \
        -i ./Pangenome/hprc-v2.0-mc-chm13_new.hapl -k ${Input_path}/${Sample_name}.kff \
        -g  ${Output_path}/${Sample_name}_diploid.gbz  ./Pangenome/hprc-v2.0-mc-chm13_new.gbz

 ./vg-1-73 giraffe -p -t 48 -Z ${Output_path}/${Sample_name}_diploid.gbz \
        -f ${Input_path}/merged_1_filter.fastq.gz \
        -f ${Input_path}/merged_2_filter.fastq.gz \
        --supplementary -o gaf > ${Output_path}/${Sample_name}_diploid_multi.gaf

./vg-1-73 pack -t 48 -Q 10 -a ${Output_path}/${Sample_name}_diploid_multi.gaf -x ${Output_path}/${Sample_name}_diploid.gbz -o ${Output_path}/${Sample_name}_diploid.pack

I am wondering maybe the header of gaf cause the error? Or supplementary info cause this error.

vg

1 answer

It looks like you got two errors. The first one occurred when parsing the command line arguments for vg pack:

error[vg pack] file "./Result/filter/HG002_diploid.pack" cannot be written to

The selected output file cannot be written to. vg should terminate at this point, but instead, you got a second error:

terminate called after throwing an instance of 'std::out_of_range'
terminate called recursively
  what(): basic_string::substr: __pos (which is 47) > this->size() (which is 46)

This could be a bug in the code that is supposed to print the context and the stack trace when the program terminates unexpectedly.

Log in to answer this question.