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

Augmentation failed on one chromosome, but succesfull on other chromosomes #4283

Open
mas-agis opened this issue May 6, 2024 · 3 comments
Open

Comments

@mas-agis
Copy link

mas-agis commented May 6, 2024

-->

1. What were you trying to do?
I tried to call vcf for each splitted chromosome after aligning short reads against the variation graph.

2. What did you want to happen?
Vcfs for all chromosome should be called separately.

3. What actually happened?
One chromosome reported error on the agumentation step while vcfs for other chromosomes were successfully called.

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:

[E::bgzf_read_block] Failed to read BGZF block data at offset 2081999101 expected 17197 bytes; hread returned 15708
terminate called after throwing an instance of 'std::runtime_error'
  what():  [vg::io::MessageIterator] obsolete, invalid, or corrupt input at message 136444839394527 group 136439356684927
━━━━━━━━━━━━━━━━━━━━
Crash report for vg v1.52.0 "Bozen"
Stack trace (most recent call last) in thread 388428:
#14   Object "", at 0xffffffffffffffff, in
#13   Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x214dd33, in __clone
#12   Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x20a73da, in start_thread
#11   Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x2049cbd, in gomp_thread_start
#10   Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0xceb07b, in void vg::io::for_each_parallel_impl<vg::Alignment>(std::istream&, std::function<void (vg::Alignment&, vg::Alignment&)> const&, std::function<void (vg::Alignment&)> const&, std::function<bool ()> const&, unsigned long) [clone ._omp_fn.0]
#9    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x5d4fe1, in vg::io::MessageIterator::take[abi:cxx11]() [clone .cold]
#8    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x2060ebd, in _Unwind_Resume
#7    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x206033b, in _Unwind_RaiseException_Phase2
#6    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x1f9caf9, in __gxx_personality_v0
#5    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x2037008, in __cxa_call_terminate
#4    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x1f9d3ab, in __cxxabiv1::__terminate(void (*)())
#3    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x5e31c3, in __gnu_cxx::__verbose_terminate_handler() [clone .cold]
#2    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x5e590b, in abort
#1    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x207c1f5, in raise
#0    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x20a8bfc, in __pthread_kill
ERROR: Signal 6 occurred. VG has crashed. Visit https://github.com/vgteam/vg/issues/new/choose to report a bug.
Please include this entire error log in your bug report!
━━━━━━━━━━━━━━━━━━━━

5. What data and command can the vg dev team use to make the problem happen?
These are the subsequent steps I executed. For this chr17, it failed on the augmentation step.

# augment the graph, filtering out mappings and bases with quality < 5, and breakpoints with coverage < 4
# the -s option is crucial
echo "Starting augmentation";
vg augment chunk_"$i".pg  chunk_"$i".gam -s -m 4 -q 5 -Q 5 -A chunk_"$i"_aug.gam > chunk_"$i"_aug.pg;

# compute the snarls
echo "Computing snarls";
vg snarls chunk_"$i"_aug.pg > chunk_"$i"_aug.snarls;

# compute the support
echo "Computing support";
vg pack -x chunk_"$i"_aug.pg -g chunk_"$i"_aug.gam -o chunk_"$i"_aug.pack;

# call variants on the component
echo "Calling variants";
vg call chunk_"$i"_aug.pg -r chunk_"$i"_aug.snarls -k chunk_"$i"_aug.pack -s "$indiv" > chr_"$i".vcf ;

6. What does running vg version say?

vg version v1.52.0 "Bozen"
Compiled with g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 on Linux
Linked against libstd++ 20230528
Built by jeizenga@emerald
@glennhickey
Copy link
Contributor

Looks like maybe the gam file is nonexistent or corrupted. You can verify by doing something like

vg validate chunk_"$i".pg  -a chunk_"$i".gam

@mas-agis
Copy link
Author

mas-agis commented May 6, 2024

It reports similar messages. How to chunk the gam only for chr 17? I chunk the vg and gam together before.

[E::bgzf_read_block] Failed to read BGZF block data at offset 2081999101 expecte                       d 17197 bytes; hread returned 15708
terminate called after throwing an instance of 'std::runtime_error'
  what():  [vg::io::MessageIterator] obsolete, invalid, or corrupt input at mess                       age 136444839394527 group 136439356684927
━━━━━━━━━━━━━━━━━━━━
Crash report for vg v1.52.0 "Bozen"
Stack trace (most recent call last):
#16   Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x616bb4, in _start
#15   Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x2065016, in __libc_                       start_main
#14   Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x20637b9, in __libc_                       start_call_main
#13   Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0xdf9b7b, in vg::subc                       ommand::Subcommand::operator()(int, char**) const
#12   Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0xe642be, in main_val                       idate(int, char**)
#11   Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x1431727, in vg::get                       _input_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::alloca                       tor<char> > const&, std::function<void (std::istream&)>)
#10   Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0xe651e7, in std::_Fu                       nction_handler<void (std::istream&), main_validate(int, char**)::{lambda(std::is                       tream&)#1}>::_M_invoke(std::_Any_data const&, std::istream&)
#9    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0xc6198b, in void vg:                       :io::for_each<vg::Alignment>(std::istream&, std::function<void (long, vg::Alignm                       ent&)> const&)
#8    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x1d359b8, in vg::io:                       :MessageIterator::operator++()
#7    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x5d47ec, in vg::io::                       MessageIterator::handle(bool, long, long) [clone .cold]
#6    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x1f9d578, in __cxa_t                       hrow
#5    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x1f9d416, in std::te                       rminate()
#4    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x1f9d3ab, in __cxxab                       iv1::__terminate(void (*)())
#3    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x5e31c3, in __gnu_cx                       x::__verbose_terminate_handler() [clone .cold]
#2    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x5e590b, in abort
#1    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x207c1f5, in raise
#0    Object "/usr/local/bioinfo/src/vg/vg-v1.52.0/vg", at 0x20a8bfc, in __pthre                       ad_kill
ERROR: Signal 6 occurred. VG has crashed. Visit https://github.com/vgteam/vg/iss                       ues/new/choose to report a bug.
Please include this entire error log in your bug report!

the pg is valid

vg validate chunk_17.pg
graph: valid

@glennhickey
Copy link
Contributor

I think you have to hcunk the vg and gam together (depsite what the options may lead you to believe). You can just do that and only use the gam output.

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