vgteam / vg

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

Assertion failed in `vg simplify` #1378

Open ifiddes-10x-zz opened 6 years ago

ifiddes-10x-zz commented 6 years ago

Attempting to perform simplify with default parameters on a small-ish graph gives the following traceback:

fpx-l-US0001 Tue Jan 16 14:13 donkey $vg simplify graph.vg > simplified.vg
Edge has been seen
Assertion failed: (site.type() == ULTRABUBBLE), function find_traversals, file src/traversal_finder.cpp, line 798.
Got signal 6
Manual stack trace:

Next ip: 0x7fff58f18e3e Next bp: 0x7ffeef80ba10
Address 0x7fff58f18e3e in mangled symbol __pthread_kill at offset 0xa, in library /usr/lib/system/libsystem_kernel.dylib at offset 0x1be3e

Next ip: 0x7fff58e75312 Next bp: 0x7ffeef80ba40
Address 0x7fff58e75312 in mangled symbol abort at offset 0x7f, in library /usr/lib/system/libsystem_c.dylib at offset 0x5d312

Next ip: 0x7fff58e3d368 Next bp: 0x7ffeef80ba80
Address 0x7fff58e3d368 in mangled symbol basename_r at offset 0, in library /usr/lib/system/libsystem_c.dylib at offset 0x25368

Next ip: 0x100965adc Next bp: 0x7fdb48777440
Address 0x100965adc in demangled symbol vg::TrivialTraversalFinder::find_traversals(vg::Snarl const&) at offset 0x99c, in library /Users/ian.fiddes/vg/donkey/./../bin/vg at offset 0x572adc

Next ip: 0x7fdb48776ea0 Next bp: 0x2000000000000001
Stack leaves code at ip=0x7fdb48776ea0
Stack trace complete
adamnovak commented 6 years ago

It looks like we never updated the simplifier to handle the existence of non-ultrabubble snarls.

There's not a really good way to simplify those out, I don't think. But the simplifier shouldn't abort; it should just leave them and their parents in the graph.

I think that assert just needs to be replaced with code to skip non-ultrabubbles.