vgteam / vg

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

vg index error: Signal 6 occurred #2420

Open verne91 opened 5 years ago

verne91 commented 5 years ago

I am trying to build the xg index for the graph. The command line is:

vg index -t 32 -x all.xg chr1.vg chr2.vg

It runs about 2 minutes and get the error:

vg: /home/ubuntu/release/vg/include/sdsl/int_vector.hpp:1360: sdsl::int_vector<<anonymous> >::reference sdsl::int_vector<<anonymous> >::operator[](const size_type&) [with unsigned char t_width = 0; sdsl::int_vector<<anonymous> >::reference = sdsl::int_vector_reference<sdsl::int_vector<0> >; sdsl::int_vector<<anonymous> >::size_type = long unsigned int]: Assertion `idx < this->size()' failed.
ERROR: Signal 6 occurred. VG has crashed. Run 'vg bugs --new' to report a bug.
Stack trace path: /tmp/vg_crash_eVTFpP/stacktrace.txt

The stacktrace.txt looks like this:

Crash report for vg v1.18.0 "Zungoli"
Stack trace (most recent call last):
#13   Object "/home/cnsun/software/bin/vg", at 0x4d5819, in _start
#12   Object "/home/cnsun/software/bin/vg", at 0x1a5d498, in __libc_start_main
#11   Object "/home/cnsun/software/bin/vg", at 0x4098a2, in main
#10   Object "/home/cnsun/software/bin/vg", at 0x9ac137, in vg::subcommand::Subcommand::operator()(int, char**) const
#9    Object "/home/cnsun/software/bin/vg", at 0x92a8fa, in main_index(int, char**)
#8    Object "/home/cnsun/software/bin/vg", at 0xb5cff0, in vg::VGset::to_xg(vg::XG&, bool, std::function<bool (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)> const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, vg::Path, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, vg::Path> > >*)
#7    Object "/home/cnsun/software/bin/vg", at 0xd6d68d, in vg::XG::from_callback(std::function<void (std::function<void (vg::Graph&)>)>, bool, bool)
#6    Object "/home/cnsun/software/bin/vg", at 0xd6a792, in vg::XG::build(std::vector<std::pair<long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >&, std::unordered_map<long, std::vector<long, std::allocator<long> >, std::hash<long>, std::equal_to<long>, std::allocator<std::pair<long const, std::vector<long, std::allocator<long> > > > >&, std::unordered_map<long, std::vector<long, std::allocator<long> >, std::hash<long>, std::equal_to<long>, std::allocator<std::pair<long const, std::vector<long, std::allocator<long> > > > >&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::pair<long, int>, std::allocator<std::pair<long, int> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::pair<long, int>, std::allocator<std::pair<long, int> > > > > >&, std::unordered_set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, bool, bool)
#5    Object "/home/cnsun/software/bin/vg", at 0xd4ee91, in sdsl::int_vector<(unsigned char)0>::operator[](unsigned long const&) [clone .isra.174]
#4    Object "/home/cnsun/software/bin/vg", at 0x404db8, in sdsl::int_vector<(unsigned char)0>::operator[](unsigned long const&) [clone .isra.174] [clone .part.175]
#3    Object "/home/cnsun/software/bin/vg", at 0x1a613b1, in __assert_fail
#2    Object "/home/cnsun/software/bin/vg", at 0x1a6133b, in __assert_fail_base
#1    Object "/home/cnsun/software/bin/vg", at 0x1a6dd60, in abort
#0    Object "/home/cnsun/software/bin/vg", at 0x10da587, in raise

any idea about this problem?

glennhickey commented 5 years ago

I'd guess that chr1.vg and chr2.vg have overlapping node-id spaces. Did you join their ids with vg ids -j? There's some discussion of this in section 2 of https://github.com/vgteam/vg/wiki/Index-Construction

verne91 commented 5 years ago

I'd guess that chr1.vg and chr2.vg have overlapping node-id spaces. Did you join their ids with vg ids -j? There's some discussion of this in section 2 of https://github.com/vgteam/vg/wiki/Index-Construction

Yes. I didn't do that step. But when I do this now, there is no result and the stdout and stderr are empty. I tried two times. The jobs completed successfully. The command line I used is: vg ids -j chr1.vg chr2.vg > new.vg What's wrong with that?

glennhickey commented 5 years ago

It modifies the files in place.

On Thu, Aug 29, 2019 at 10:46 AM Chen Sun notifications@github.com wrote:

I'd guess that chr1.vg and chr2.vg have overlapping node-id spaces. Did you join their ids with vg ids -j? There's some discussion of this in section 2 of https://github.com/vgteam/vg/wiki/Index-Construction

Yes. I didn't do that step. But when I do this now, there is no result and the stdout and stderr are empty. I tried two times. The jobs completed successfully. The command line I used is: vg ids -j chr1.vg chr2.vg > new.vg What's wrong with that?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vgteam/vg/issues/2420?email_source=notifications&email_token=AAG373UVLBBDTEUAEBBZRBLQG7ON7A5CNFSM4IRN33U2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5OXUWI#issuecomment-526219865, or mute the thread https://github.com/notifications/unsubscribe-auth/AAG373W6FJRZ23BHD2T5USTQG7ON7ANCNFSM4IRN33UQ .

verne91 commented 5 years ago

It modifies the files in place. On Thu, Aug 29, 2019 at 10:46 AM Chen Sun @.***> wrote: I'd guess that chr1.vg and chr2.vg have overlapping node-id spaces. Did you join their ids with vg ids -j? There's some discussion of this in section 2 of https://github.com/vgteam/vg/wiki/Index-Construction Yes. I didn't do that step. But when I do this now, there is no result and the stdout and stderr are empty. I tried two times. The jobs completed successfully. The command line I used is: vg ids -j chr1.vg chr2.vg > new.vg What's wrong with that? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#2420?email_source=notifications&email_token=AAG373UVLBBDTEUAEBBZRBLQG7ON7A5CNFSM4IRN33U2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5OXUWI#issuecomment-526219865>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAG373W6FJRZ23BHD2T5USTQG7ON7ANCNFSM4IRN33UQ .

Yes. It works when I built the xg index. But the help message of xg ids looks like this. It generates a new.vg file.

$ vg ids
usage: vg ids [options] <graph1.vg> [graph2.vg ...] >new.vg
options:
    -c, --compact        minimize the space of integers used by the ids
    -i, --increment N    increase ids by N
    -d, --decrement N    decrease ids by N
    -j, --join           make a joint id space for all the graphs that are supplied
                         by iterating through the supplied graphs and incrementing
                         their ids to be non-conflicting (modifies original files)
    -m, --mapping FILE   create an empty node mapping for vg prune
    -s, --sort           assign new node IDs in (generalized) topological sort order