Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VG crashing: invalid, or corrupt input at message #2597

Closed
cademirch opened this issue Jan 10, 2020 · 8 comments
Closed

VG crashing: invalid, or corrupt input at message #2597

cademirch opened this issue Jan 10, 2020 · 8 comments

Comments

@cademirch
Copy link

cademirch commented Jan 10, 2020

1. What were you trying to do?
I was trying to make an xg index and annotate a GAM.

2. What did you want to happen?
Make an xg index, as well as annotate a GAM

3. What actually happened?
vg crashed.
what(): [vg::io::MessageIterator] obsolete, invalid, or corrupt input at message 12668894457 group 11257826026 ERROR: Signal 6 occurred. VG has crashed. Run 'vg bugs --new' to report a bug.

This crash happened on two separate instances - with two different graphs. The message and group were different for both instances.

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:

Crash report for vg v1.21.0 "Fanano"
Stack trace (most recent call last):
#15   Object "/public/home/cmirchan/bin/vg", at 0x4d8e59, in _start
#14   Object "/public/home/cmirchan/bin/vg", at 0x1b00f98, in __libc_start_main
#13   Object "/public/home/cmirchan/bin/vg", at 0x40ae92, in main
#12   Object "/public/home/cmirchan/bin/vg", at 0x9a92b7, in vg::subcommand::Subcommand::operator()(int, char**) const
#11   Object "/public/home/cmirchan/bin/vg", at 0x8effde, in main_annotate(int, char**)
#10   Object "/public/home/cmirchan/bin/vg", at 0xa4470c, in vg::get_input_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void (std::istream&)>)
#9    Object "/public/home/cmirchan/bin/vg", at 0x8f0afc, in std::_Function_handler<void (std::istream&), main_annotate(int, char**)::{lambda(std::istream&)#3}>::_M_invoke(std::_Any_data const&, std::istream&)
#8    Object "/public/home/cmirchan/bin/vg", at 0x8f43ec, in void vg::io::for_each<vg::Alignment>(std::istream&, std::function<void (long, vg::Alignment&)> const&)
#7    Object "/public/home/cmirchan/bin/vg", at 0xea0308, in vg::io::MessageIterator::operator++()
#6    Object "/public/home/cmirchan/bin/vg", at 0xe9fb9c, in vg::io::MessageIterator::handle(bool, long, long)
#5    Object "/public/home/cmirchan/bin/vg", at 0x1a410c3, in __cxa_throw
#4    Object "/public/home/cmirchan/bin/vg", at 0x1a3fda0, in std::terminate()
#3    Object "/public/home/cmirchan/bin/vg", at 0x1a3fd55, in __cxxabiv1::__terminate(void (*)())
#2    Object "/public/home/cmirchan/bin/vg", at 0x1adb714, in __gnu_cxx::__verbose_terminate_handler()
#1    Object "/public/home/cmirchan/bin/vg", at 0x1b11860, in abort
#0    Object "/public/home/cmirchan/bin/vg", at 0x10d25c7, in raise

5. What data and command can the vg dev team use to make the problem happen?
I can make the data available if need be.

6. What does running vg version say?

vg version v1.21.0 "Fanano"
Compiled with g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0 on Linux
Linked against libstd++ 20181206
Built by anovak@hex
@ekg
Copy link
Member

ekg commented Jan 10, 2020 via email

@cademirch
Copy link
Author

vg annotate -n -x ZI284_main.xg -a sim.gam | tail -n+2 | pv -l | sort >novelty.tsv

and

vg index -x ref.mod.xg ref.mod.vg

The index command had a similar error, but at a different message and group number:
[E::bgzf_uncompress] Inflate operation failed: 1 terminate called after throwing an instance of 'std::runtime_error' what(): [vg::io::MessageIterator] obsolete, invalid, or corrupt input at message 3616525884758 group 3616525884754 ERROR: Signal 6 occurred. VG has crashed. Run 'vg bugs --new' to report a bug. Stack trace path: /tmp/vg_crash_CQXcOy/stacktrace.txt Please include the stack trace file in your bug report!

@ekg
Copy link
Member

ekg commented Jan 10, 2020 via email

@cademirch
Copy link
Author

cademirch commented Jan 10, 2020

Yep, sorry about that.

#!/bin/bash
IFS=$'\n\t'

chroms=("NC_004354.4"
        "NT_033779.5"
        "NT_033778.4"
        "NT_037436.4"
        "NT_033777.3"
        "NC_004353.4"
        "NC_024512.1"
        )

for chrom in ${chroms[@]}; do
       vg mod -k ${chrom} ZI284.sim.vg >> ref.mod.vg
done

@ekg
Copy link
Member

ekg commented Jan 10, 2020 via email

@cademirch
Copy link
Author

I am trying to subset the reference portion of that graph. What I am trying to do is replicate the map-sim script referenced in #1873. I am trying to make the input graphs haps-base, sim-base, and sim-ref. I believe I understand how to create sim-base using vg construct -a, but I am unclear on how to derive haps-base and sim-ref from sim-base.

@ekg
Copy link
Member

ekg commented Jan 10, 2020 via email

@cademirch
Copy link
Author

cademirch commented Jan 10, 2020

This is what I've attempted so far, and I believe is the way to create these graphs (correct me if I'm wrong)

vg construct -a -r ref.fa -v vars.vcf.gz > sim_base.vg
vg index -x sim_base.xg sim_base.vg #(do I need to include -L for the alt paths?)
vg index -G sim_base.gbwt -v vars.vcf.gz sim_base.vg
### haps0.txt and haps1.txt contain name of haplotype threads 1 per line
vg augment sim_base.vg -B <(vg paths -g sim_base.gbwt -p haps0.txt -X) > sim_haps0.vg
vg augment sim_base.vg -B <(vg paths -g sim_base.gbwt -p haps1.txt -X) > sim_haps1vg
### make sim_ref?
### sim reads and make truth.tsv and novelty.tsv

I understand obtaining the reference relative positions using sim_base. However I would also like to know the subset of reads that map exactly to the reference and those which touch non-reference variation. Map-sim refers to using sim-ref which is what I am trying to achieve.

Could you point me to that issue?

I'm not sure what you mean by input to the simulation, I've got indexed haplotype graphs.

Thank you for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants