vgteam / vg

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

vg map returns Unimplemented XG format version: 4 #3640

Open Meshkati opened 2 years ago

Meshkati commented 2 years ago

1. What were you trying to do? Hi, I was trying to run vg map on the cactus_yeast data, provided here: https://courtyard.gi.ucsc.edu/~anovak/vg-data/cactus_yeast/chroms/

2. What did you want to happen? I expected the mapping being done.

3. What actually happened? I got the following error after running the command:

$ vg map -x cactus-YEAST.xg -g cactus-YEAST.gcsa -f r1.fastq -f r2.fastq > align.gam

terminate called after throwing an instance of 'xg::XGFormatError'
  what():  Unimplemented XG format version: 4
ERROR: Signal 6 occurred. VG has crashed. Run 'vg bugs --new' to report a bug.
Stack trace path: /tmp/vg_crash_STJ8nl/stacktrace.txt

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: On 1.29 I get the following stacktrace:

#13   Object "/vg/bin/vg", at 0x4e5db9, in _start
#12   Object "/vg/bin/vg", at 0x1d82958, in __libc_start_main
#11   Object "/vg/bin/vg", at 0x40b737, in main
#10   Object "/vg/bin/vg", at 0xab1327, in vg::subcommand::Subcommand::operator()(int, char**) const
#9    Object "/vg/bin/vg", at 0x9f41a1, in main_map(int, char**)
#8    Object "/vg/bin/vg", at 0x9e4f6d, in std::unique_ptr<handlegraph::PathHandleGraph, std::default_delete<handlegraph::PathHandleGraph> > vg::io::VPKG::try_load_one<handlegraph::PathHandleGraph>(std::istream&)
#7    Object "/vg/bin/vg", at 0x10afaf8, in std::_Function_handler<void* (std::istream&), vg::io::register_loader_saver_xg()::{lambda(std::istream&)#1}>::_M_invoke(std::_Any_data const&, std::istream&)
#6    Object "/vg/bin/vg", at 0x15984b5, in xg::XG::deserialize_members(std::istream&)
#5    Object "/vg/bin/vg", at 0x1ccabb3, in __cxa_throw
#4    Object "/vg/bin/vg", at 0x1cccc10, in std::terminate()
#3    Object "/vg/bin/vg", at 0x1cccbc5, in __cxxabiv1::__terminate(void (*)())
#2    Object "/vg/bin/vg", at 0x1d64fa4, in __gnu_cxx::__verbose_terminate_handler()
#1    Object "/vg/bin/vg", at 0x1d93220, in abort
#0    Object "/vg/bin/vg", at 0x11767f7, in raise

On 1.14 and 1.9 I got:

Crash report for vg v1.9.0-120-gfc5db8e "Miglionico"
Stack trace (most recent call last):
#13   Object "/vg/bin/vg", at 0x4c3888, in _start
#12   Object "/vg/bin/vg", at 0x17390f9, in __libc_start_main
#11   Object "/vg/bin/vg", at 0x1738f05, in generic_start_main
#10   Object "/vg/bin/vg", at 0x40ab16, in main
      Source "src/main.cpp", line 61, in main [0x40ab16]
#9    Object "/vg/bin/vg", at 0x8949c7, in vg::subcommand::Subcommand::operator()(int, char**) const
    | Source "src/subcommand/subcommand.cpp", line 72, in operator()
      Source "/usr/include/c++/5/functional", line 2267, in operator() [0x8949c7]
#8    Object "/vg/bin/vg", at 0x86c269, in main_map(int, char**)
      Source "src/subcommand/map_main.cpp", line 621, in main_map [0x86c269]
#7    Object "/vg/bin/vg", at 0xa299ba, in xg::XG::XG(std::istream&)
      Source "src/xg.cpp", line 76, in XG [0xa299ba]
#6    Object "/vg/bin/vg", at 0xa28dbd, in xg::XG::load(std::istream&)
      Source "src/xg.cpp", line 251, in load [0xa28dbd]
#5    Object "/vg/bin/vg", at 0x1685f18, in __cxa_throw
#4    Object "/vg/bin/vg", at 0x1686d10, in std::terminate()
#3    Object "/vg/bin/vg", at 0x1686cc5, in __cxxabiv1::__terminate(void (*)())
#2    Object "/vg/bin/vg", at 0x17183dc, in __gnu_cxx::__verbose_terminate_handler()
#1    Object "/vg/bin/vg", at 0x1749839, in abort
#0    Object "/vg/bin/vg", at 0xece5d9, in raise
      Source "../sysdeps/unix/sysv/linux/pt-raise.c", line 35, in raise [0xece5d9]

5. What data and command can the vg dev team use to make the problem happen? I found the link to data from the tests inside vgci.py

6. What does running vg version say?

1.29
1.14.0 ( docker image )
v1.9.0-120-gfc5db8e2-t222-run ( docker image )
glennhickey commented 2 years ago

It looks like we dropped support for that version of xg. But the original vg file seems to be in that directory, so you can recreate the xg by running vg index cactus-YEAST.vg -x cactus-YEAST.xg

Meshkati commented 2 years ago

Thanks for your response. I did the same, but the process got killed many times ( I guess due to lack of resources ). So I tried to prune the graph and index it, but on the v1.39.0 I get the following error: error[VPKG::load_one]: Correct input type not found in cactus-YEAST.vg while loading handlegraph::MutablePathDeletableHandleGraph I can use v1.29.0 for pruning, but later on I get other incompatibility problems on some vg commands :(

Note that I have a system with 16GB memory and 500GB drive space ( for those tmp files that vg index generates ) but it still got killed creating about 100GB tmp data.

So can you update those graph and index files in https://courtyard.gi.ucsc.edu/~anovak/vg-data/cactus_yeast/chroms/ ?