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 pack error #4463

Open
sdws1983 opened this issue Dec 2, 2024 · 4 comments
Open

vg pack error #4463

sdws1983 opened this issue Dec 2, 2024 · 4 comments

Comments

@sdws1983
Copy link

sdws1983 commented Dec 2, 2024

1. What were you trying to do?

Run vg giraffe and vg pack to generate .pack file.

2. What did you want to happen?

Generate .pack file without errors

3. What actually happened?

Error occurred.

My command:

vg giraffe -t 40 -p -Z ref.giraffe.gbz -m ref.min -d ref.dist -f test_1.fq.gz -f test_2.fq.gz |  vg pack --threads 24 -x ref.giraffe.gbz -g - -o test.pack -Q 5

My logs:

Mapped 442147310 reads across 40 threads in 212111 seconds with 12.9819 additional single-threaded seconds.
Mapping speed: 52.1125 reads per second per thread
Used 1.34949e+06 CPU-seconds (including output).
Achieved 327.64 reads per CPU-second (including output)
Memory footprint: 39.0596 GB
vg: src/packer.cpp:883: size_t vg::Packer::average_node_quality(size_t) const: Assertion `total_node_quality(i) == 0' failed.
━━━━━━━━━━━━━━━━━━━━
Crash report for vg v1.60.0 "Annicco"
Stack trace (most recent call last) in thread 24550:
#10   Object "", at 0xffffffffffffffff, in 
#9    Object "/public2/home/software/vg", at 0x21cb233, in __clone
#8    Object "/public2/home/software/vg", at 0x212476a, in start_thread
#7    Object "/public2/home/software/vg", at 0x20c6ffd, in gomp_thread_start
#6    Object "/public2/home/software/vg", at 0x1296cd0, in vg::Packer::make_compact() [clone ._omp_fn.6]
#5    Object "/public2/home/software/vg", at 0x12965df, in vg::Packer::average_node_quality(unsigned long) const
#4    Object "/public2/home/software/vg", at 0x20f2f65, in __assert_fail
#3    Object "/public2/home/software/vg", at 0x5f201b, in __assert_fail_base.cold
#2    Object "/public2/home/software/vg", at 0x5f20f3, in abort
#1    Object "/public2/home/software/vg", at 0x20f9575, in raise
#0    Object "/public2/home/software/vg", at 0x21260cc, 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!
━━━━━━━━━━━━━━━━━━━━

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:

Place stacktrace here.

5. What data and command can the vg dev team use to make the problem happen?

6. What does running vg version say?

Place vg version output here
@ryandkuster
Copy link

ryandkuster commented Dec 4, 2024

Just to chime in for further context, I'm experiencing the exact same error at the vg pack step (vg v1.61.0 "Plodio") and can't seem to find a workaround. Giraffe/pack/call works for 94% of the samples, so it would be surprising if there were something wrong with the indexing or chopping of the .gbz used by vg giraffe or vg pack. This seems independent of the sample, and in some instances, identical samples split across multiple sequencing lanes will yield this vg pack error in only one technical replicate. Investigating those instances where two sequencing replicates produce gams that pass and fail the vg pack step, vg validate yields invalid alignments in both taking these two forms:

  • "Edit erroneously claims match on node ___ between node position ___ and edit 0, position 0 on reverse strand"
  • "Length of node ___ (n) exceeded by Mapping with offset n and from-length n:"

These invalid alignment warnings are found in both the passing and failing replicates. The graph is valid.

For additional context, I've constructed the pangenome as follows:

  1. PGGB for chromosome-wise pangenome construction
  2. ODGI squeeze to combine .og chromosomes
  3. ODGI view to convert to .gfa
  4. vg autoindex -X RG --workflow giraffe on the .gfa
  5. vg giraffe -Z .gbz -m .min -d .dist -f R1.fq -f R2.fq
  6. vg pack -x .rg -g .gam -Q 5 (also attempted 'vg pack -x .gbz -g .gam -Q 5` with same error)

Please let me know if there are any troubleshooting steps that would be helpful to assist with. The genotyping from the 94% of samples that did work is very promising!

I appreciate y'all!

@glennhickey
Copy link
Contributor

Those validate messages aren't warnings, they are fatal errors denoting gbz/gam incompatiblility. So it would seem something went very wrong regardless of whether or not pack crashes.

Usually this is a result of using a different graph file between vg giraffe and vg pack. But if that's not the case here, then it would seem to be a bug in giraffe causing an incorrect mapping in the GAM.

If it is a giraffe bug, the only way forward might be to share some data to reproduce so one of the developers can debug it...

@ryandkuster
Copy link

@glennhickey I'm able to share the relevant files. Let me know the best contact and method of transfer. Thanks!

@glennhickey
Copy link
Contributor

whatever's easiest -- maybe a google drive link or something.

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

3 participants