This is a test version of Biostars. For the public version, visit https://www.biostars.org.
VG Crash with HPRC V2.0 Graph and Indexes

Hello, I previously ran a full vg workflow (giraffe -> vcf call) using HPRC-t2t-V1.1 reference on WDL/Cromwell. That job used an older version of VG 1.64. I have recently updated our Docker to vg 'Ducky' and am trying the workflow on hprc-v2.0-mc-chm13.d46.gbz (a significantly larger reference graph). While I upped the mem/threads for the alignment step (256G/16cpus). I'm running into

std::runtime_error

I'll share the full error:

[vg giraffe] Guessing that /.../hprc-v2.0-mc-chm13.d46.dist is Giraffe Distance Index
[vg giraffe] Guessing that /.../hprc-v2.0-mc-chm13.d46.min is Short Read Minimizers
[vg giraffe] Rebuilding minimizer index to include zipcodes
[IndexRegistry] Constructing minimizer index and associated zipcodes
[IndexRegistry] using parameters -k 29 -w 11 terminate called after throwing an instance of 'std::runtime_error'
what(): error: Trying to load a SnarlDistanceIndex which is v998 instead of the up-to-date v4; try regenerating the index

I would prefer not to regenerate the indexes since they are publicly available and require major compute to do so. I suspect a version mismatch, but both indexes and gbz are from https://42basepairs.com/browse/s3/human-pangenomics/pangenomes/scratch/2025_02_28_minigraph_cactus/hprc-v2.0-mc-chm13

vg

1 answer

You need to rebuild the indexes or use an older version of vg. There have been breaking changes to both the distance index and the minimizer index since the v2.0 graphs were released.

Or you could use v2.1 graphs instead. They include some improvements over v2.0, and the indexes should work with the latest vg releases.

Thank you for sharing that! I am now using v2.1 and have explicitly added the following files to the allignment step to avoid any ambiguity:

"gbz": "/hprc-v2.1-mc-chm13.d46.gbz",
"dist": "/hprc-v2.1-mc-chm13.d46.dist",
"min": "/hprc-v2.1-mc-chm13.d46.shortread.withzip.min",
"zipcode" : "hprc-v2.1-mc-chm13.d46.shortread.zipcodes"

However, I am still running into some interesting warnings:

WARNING: loading in a SnarlDistanceIndex which is v3 instead of the up-to-date v4 Upgrading to the latest version will improve alignments from vg giraffe's chaining mode

While the warning doesn't stop the job from running, I get continuous Watchdog warnings with no growth to the output file (.gam)

warning[vg::Watchdog]: Thread 11 has been checked in for 10 seconds processing: warning[vg::Watchdog]: Thread 11 finally checked out after 122 seconds and 0 kb memory growth processing:

Any suggestions are appreciated.

The issue could be due to the data or the environment. A common issue with the latter is that the distance index is a memory-mapped file, and some network file systems do not handle them well. That can sometimes be solved by marking the distance index read-only or using a copy on a local disk.

If that doesn't solve it, what can you tell about the data?

Log in to answer this question.