Code Monkey home page Code Monkey logo

Comments (5)

glennhickey avatar glennhickey commented on September 26, 2024

It's probably running out of memory loading all the paths (vg works best on xg/gbz/gbwt at this scale) The simplest work-around is probably

grep -v ^W hprc-v1.0-mc-grch38.gfa > hprc-v1.0-mc-grch38-nohaps.gfa

Then run pack on that. (you dont' have to rerun graphaligner).

from vg.

laurentijntilleman avatar laurentijntilleman commented on September 26, 2024

I tried this work-around, but I still have the same error.

grep -v ^W hprc-v1.0-mc-grch38.gfa > hprc-v1.0-mc-grch38-nohaps.gfa
vg pack -t 40 -x hprc-v1.0-mc-grch38-nohaps.gfa -i PCR.gam -Q 5 -o PCR.pack
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
ERROR: Signal 6 occurred. VG has crashed. Visit https://github.com/vgteam/vg/issues/new/choose to report a bug.
Stack trace path: /tmp/vg_crash_fozdcq/stacktrace.txt
Please include the stack trace file in your bug report!

I also tried with the hprc-v1.0-mc-grch38.xg reference:

vg pack -t 40 -x hprc-v1.0-mc-grch38.xg -i PCR.gam -Q 5 -o PCR.pack
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
ERROR: Signal 6 occurred. VG has crashed. Visit https://github.com/vgteam/vg/issues/new/choose to report a bug.
Stack trace path: /tmp/vg_crash_Xyjddb/stacktrace.txt
Please include the stack trace file in your bug report!

Also here, I got the same error.

from vg.

glennhickey avatar glennhickey commented on September 26, 2024

Try passing in the .gam to vg pack with -g instead of -i.

    -i, --packs-in FILE    begin by summing coverage packs from each provided FILE
    -g, --gam FILE         read alignments from this GAM file (could be '-' for stdin)

from vg.

laurentijntilleman avatar laurentijntilleman commented on September 26, 2024

The -g option resolved part of the issue. Now I got a new issue when -Q is 0. When -Q is greater than 0, then the pack file looks empty because there are no variants called with vg call

Command used

vg pack -t 40 -x hprc-v1.0-mc-grch38.xg -g PCR.gam -o PCR.pack

Error

vg: /home/anovak/workspace/vg/include/sdsl/int_vector.hpp:1391: 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. Visit https://github.com/vgteam/vg/issues/new/choose to report a bug.
Stack trace path: /tmp/vg_crash_YGcHQY/stacktrace.txt
Please include the stack trace file in your bug report!

Crash report

Crash report for vg v1.45.0 "Alpicella"
Stack trace (most recent call last) in thread 121214:
#15   Object "", at 0xffffffffffffffff, in 
#14   Object "/tools/vg/vg", at 0x1f3c532, in __clone
#13   Object "/tools/vg/vg", at 0x14498f8, in start_thread
#12   Object "/tools/vg/vg", at 0x1e70d3d, in gomp_thread_start
#11   Object "/tools/vg/vg", at 0xc61502, 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]
#10   Object "/tools/vg/vg", at 0x1e73617, in gomp_team_barrier_wait_end
#9    Object "/tools/vg/vg", at 0x1e6acdb, in gomp_barrier_handle_tasks
#8    Object "/tools/vg/vg", at 0xc60e11, 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.1]
#7    Object "/tools/vg/vg", at 0xed808a, in vg::Packer::add(vg::Alignment const&, int, int, int)
#6    Object "/tools/vg/vg", at 0xece83b, in vg::Packer::increment_coverage(unsigned long)
#5    Object "/tools/vg/vg", at 0xedc15d, in gcsa::CounterArray::increment(unsigned long)
#4    Object "/tools/vg/vg", at 0xeca81b, in sdsl::int_vector<(unsigned char)0>::operator[](unsigned long const&) [clone .isra.0]
#3    Object "/tools/vg/vg", at 0x1e94295, in __assert_fail
#2    Object "/tools/vg/vg", at 0x5b5e67, in __assert_fail_base.cold
#1    Object "/tools/vg/vg", at 0x5b5f97, in abort
#0    Object "/tools/vg/vg", at 0x144d17b, in raise

from vg.

glennhickey avatar glennhickey commented on September 26, 2024

The gfa and xg aren't compatible (confusing, I know). So you can't map with the gfa and use that gam with the xg.

If I were you, i'd make a new xg that is compatible with the gfa

grep -v ^W graph.gfa | vg convert - -x > graph.xg

(vg convert -Hx graph.gfa > graph.xg will also work but may use much more memory)

and then run pack on that.

from vg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.