vgteam / vg

tools for working with genome variation graphs
https://biostars.org/tag/vg/
Other
1.1k stars 194 forks source link

vg pack crash #3940

Closed Dkyuan closed 1 year ago

Dkyuan commented 1 year ago

1. What were you trying to do? I was runing giraffe--pack --call pipeline to detect SV with two-paired end 150bp short reads. It crashed at the vg pack step.

2. What did you want to happen? I want to get the .pack file from the .gam file using vg pack to run vg call in the next step.

3. What actually happened? The giraffe and stats seemed right: When I used vg view -j -a WSC99.mapped.gam |less to check the gam file, it showed: 图片

The stat result file is with no problem: 图片

It stopped at the vg pack step with:

vg: src/packer.cpp:883: size_t vg::Packer::average_node_quality(size_t) const: Assertion `total_node_quality(i) == 0' failed.
vg: src/packer.cpp:883: size_t vg::Packer::average_node_quality(size_t) const: Assertion `total_node_quality(i) == 0' failed.
vg: src/packer.cpp:883: size_t vg::Packer::average_node_quality(size_t) const: Assertion `total_node_quality(i) == 0' failed.
vg: src/packer.cpp:883: size_t vg::Packer::average_node_quality(size_t) const: Assertion `total_node_quality(i) == 0' failed.
ERROR: Signal 6 occurred. VG has crashed. Visit https://github.com/vgteam/vg/issues/new/choose to report a bug.
Stack trace path: /tmp/vg_crash_fdJVLR/stacktrace.txt
Please include the stack trace file in your bug report!

4. If you got a line like Stack trace path: /somewhere/on/your/computer/stacktrace.txt, please copy-paste the contents of that file here: the stacktrace.txt is shown below:

Crash report for vg v1.36.0 "Cibottola"
Stack trace (most recent call last) in thread 19709:
#8    Object "", at 0xffffffffffffffff, in 
#7    Object "", at 0x1cf7692, in 
#6    Object "", at 0x1336ff8, in 
#5    Object "", at 0x1c3077d, in 
#4    Object "", at 0xfdd601, in 
#3    Object "", at 0x1c53bd5, in 
#2    Object "", at 0x581c63, in 
#1    Object "", at 0x581d93, in 
#0    Object "", at 0x133a3db, in

5. What data and command can the vg dev team use to make the problem happen? The three command lines I used were shown below, and I wrote them in a shell_test file,then run with nohup ./shell_test >test.log 2>&1 & [as suggested in issue #3915 ]

vg giraffe -Z ${idx}/graph.giraffe.gbz -m ${idx}/graph.min -d ${idx}/graph.dist -x ${idx}/graph.xg -f WSC99_1_clean.fq.gz -f WSC99_2_clean.fq.gz >WSC99.mapped.gam 2>erro_giraffe.log
vg stats -a WSC99.mapped.gam >WSC99.mapped.stat
vg pack -t 10 -Q 5 -s 5 -g WSC99.mapped.gam -x ${idx}/graph.xg -o WSC99.pack

6. What does running vg version say?

version v1.36.0 "Cibottola"

7. What I tried

  1. I tried to use .gbz instead of .xg file and just run vg pack with command line:

    vg pack -t 10 -Q 5 -s 5 -g WSC99.mapped.gam -x ${idx}/graph.gbz -o WSC99.pack

    It stopped with:

    error[VPKG::load_one]: Could not open /path/to/graph.gbz while loading handlegraph::HandleGraph
  2. I tried the newes vg [vg version v1.47.0 "Ostuni"; binary executable file]

    /path/to/new/vg giraffe -Z ${idx}/graph.giraffe.gbz -m ${idx}/graph.min -d ${idx}/graph.dist -x ${idx}/graph.xg -f WSC99_1_clean.fq.gz -f WSC99_2_clean.fq.gz >WSC99.new.gam 2>erro_giraffe_new.log

    It stopped with erro in "erro_giraffe_new.log" file:

    MinimizerHeader: Expected v8, got v7
    error[VPKG::load_one]: Correct input type not found in /path/to/graph.dist while loading bdsg::SnarlDistanceIndex

    I also tried ro run new vg pack (v1.47.0) with old gam file (from v1.36), it also stopped whit crash:

    
    /path/to/new/vg pack -t 10 -Q 5 -s 5 -g WSC99.mapped.gam -x ${idx}/graph.xg -o WSC99.pack
    vg: src/packer.cpp:883: size_t vg::Packer::average_node_quality(size_t) const: Assertion `total_node_quality(i) == 0' failed.
    vg: src/packer.cpp:883: size_t vg::Packer::average_node_quality(size_t) const: Assertion `total_node_quality(i) == 0' failed.
    vg: src/packer.cpp:883: size_t vg::Packer::average_node_quality(size_t) const: Assertion `total_node_quality(i) == 0' failed.
    vg: src/packer.cpp:883: size_t vg::Packer::average_node_quality(size_t) const: Assertion `total_node_quality(i) == 0' failed.
    vg: src/packer.cpp:883: size_t vg::Packer::average_node_quality(size_t) const: Assertion `total_node_quality(i) == 0' failed.
    ERROR: Signal 6 occurred. VG has crashed. Visit https://github.com/vgteam/vg/issues/new/choose to report a bug.
    Stack trace path: /tmp/vg_crash_4zqi2s/stacktrace.txt
    Please include the stack trace file in your bug report!

cat /tmp/vg_crash_4zqi2s/stacktrace.txt

Crash report for vg v1.47.0 "Ostuni" Stack trace (most recent call last) in thread 86838:

9 Object "", at 0xffffffffffffffff, in

8 Object "", at 0x1f9c072, in

7 Object "", at 0x149d568, in

6 Object "", at 0x1ed087d, in

5 Object "", at 0xefc1b0, in

4 Object "", at 0xefbd56, in

3 Object "", at 0x1ef3dd5, in

2 Object "", at 0x5bee77, in

1 Object "", at 0x5befa7, in

0 Object "", at 0x14a0deb, in

glennhickey commented 1 year ago

Yeah, you definitely need to pass the .gbz into vg pack. If you're getting error[VPKG::load_one]: Could not open /path/to/graph.gbz while loading handlegraph::HandleGraph it's because there's a typo and /path/to/graph.gbz does not exist on your filesystem. If you pass it the correct path to your GBZ (the same one used for giraffe) it should work.

Dkyuan commented 1 year ago

Yeah, you definitely need to pass the .gbz into vg pack. If you're getting error[VPKG::load_one]: Could not open /path/to/graph.gbz while loading handlegraph::HandleGraph it's because there's a typo and /path/to/graph.gbz does not exist on your filesystem. If you pass it the correct path to your GBZ (the same one used for giraffe) it should work.

Thank you for your time. I wrote a wrong name "graph.gbz", It's "graph.giraffe.gbz". So, it works with:

vg pack -t 10 -Q 5 -s 5 -g WSC99.mapped.gam -x ${idx}/graph.giraffe.gbz -o WSC99.pack

Thank you very much agian !

Dkyuan commented 1 year ago

Yeah, you definitely need to pass the .gbz into vg pack. If you're getting error[VPKG::load_one]: Could not open /path/to/graph.gbz while loading handlegraph::HandleGraph it's because there's a typo and /path/to/graph.gbz does not exist on your filesystem. If you pass it the correct path to your GBZ (the same one used for giraffe) it should work.

Thank you for your time. I wrote a wrong name "graph.gbz", It's "graph.giraffe.gbz". So, it works with:

vg pack -t 10 -Q 5 -s 5 -g WSC99.mapped.gam -x ${idx}/graph.giraffe.gbz -o WSC99.pack

Thank you very much agian !

For supplementary: I used vg version 1.43 to build the graph index, while i used version 1.36 to run giraffe and pack. It worked for giraffe but nor for pack even with the right name graph.giraffe.gbz before the correction of vg version.