vg icon indicating copy to clipboard operation
vg copied to clipboard

vg call - Segmentation fault (core dumped)

Open nklspp opened this issue 11 months ago • 6 comments

Hi VG teams I am copying a post from BioStars where I explain my process in more details but it was suggested to post the bug here. Here is the link from the original post.

1. What were you trying to do? I am trying to call variants using vg call using a previously built pangenome-graph. I build it using HGDP vcf and I am aligning other individuals from HGDP aswell.

2. What did you want to happen? I wanted to get a VCF from the GAM file that I got from the previous alignment step.

3. What actually happened? I have the following segmentation fault:

Crash report for vg ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Crash report for vg ━━━━━━━━━━━━━━━━━━━━
Crash report for vg
Crash report for vg ━━━━━━━━━━━━━
Crash report for vg ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Crash report for vg ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Crash report for vg ━━━━━━━━━━━━━━━━━━━
Crash report for vg ━━━━━━━━━━━━━
Crash report for vg ━━━━━━━━━━━━━━━━━━━━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━━━━━━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━━━━━━━━━━━
Crash report for vg v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━━━━━━━
Crash report for vg ━━━━━━━━━━━━━━━━━━━━━━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Crash report for vg ━━━━━━━━
Crash report for vg ━━━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Crash report for vg v1.48.0-59-g276aa51e3 "Gallipoli"

Crash report for vg ━━━━━━━━━━━━━━━━━
Crash report for vg ━━━━━━━━━━━━━━━━━━━━
Crash report for vg
Crash report for vg v1.48.0-59-g276aa51e3 "Gallipoli"
v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━━━━━━━━━━━━━━━━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━
Crash report for vg ━━v1.48.0-59-g276aa51e3 "Gallipoli"
v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━
Crash report for vg ━━━━━━━━━━
Crash report for vg v1.48.0-59-g276aa51e3 "Gallipoli"
━━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Crash report for vg ━━━
Crash report for vg ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Crash report for vg ━━━━━━━━━━━━━━━━━━━━
Crash report for vg ━━━━━━
Crash report for vg ━━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━
Crash report for vg ━━━━━━━━━━━v1.48.0-59-g276aa51e3 "Gallipoli"
v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━v1.48.0-59-g276aa51e3 "Gallipoli"v1.48.0-59-g276aa51e3 "Gallipoli"
v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━━━━━
Crash report for vg ━
Crash report for vg ━━━━━━━━━━━━
Crash report for vg ━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━
Crash report for vg ━━━
Crash report for vg ━v1.48.0-59-g276aa51e3 "Gallipoli"
━━
Crash report for vg ━━━━━━━━━━━━━━━━━━━━━━━━━━
Crash report for vg ━━━━━━━━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━v1.48.0-59-g276aa51e3 "Gallipoli"
v1.48.0-59-g276aa51e3 "Gallipoli"
━
Crash report for vg ━━━━━━━━━━━
Crash report for vg ━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━━━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━━━━━━━━━━━
Crash report for vg v1.48.0-59-g276aa51e3 "Gallipoli"

Crash report for vg ━━━
━━━━━━━━
Crash report for vg ━━━━━━━━v1.48.0-59-g276aa51e3 "Gallipoli"

v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━
Crash report for vg ━━━━━━━━━━━━━━━━━━━━━━━
Crash report for vg ━━━━━━━━━━━
Crash report for vg
Crash report for vg ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Crash report for vg ━v1.48.0-59-g276aa51e3 "Gallipoli"
v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━━━━━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━━━━━━
Crash report for vg v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━
Crash report for vg ━━━━━━v1.48.0-59-g276aa51e3 "Gallipoli"
v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━
Crash report for vg
v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━
Crash report for vg Crash report for vg ━━━━━━━━━
Crash report for vg ━━━━━━━━━━━━━━━━━
Crash report for vg ━━━━━━━v1.48.0-59-g276aa51e3 "Gallipoli"
v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━━━━━━━━
Crash report for vg v1.48.0-59-g276aa51e3 "Gallipoli"
v1.48.0-59-g276aa51e3 "Gallipoli"
v1.48.0-59-g276aa51e3 "Gallipoli"
v1.48.0-59-g276aa51e3 "Gallipoli"
v1.48.0-59-g276aa51e3 "Gallipoli"
━━━
Crash report for vg v1.48.0-59-g276aa51e3 "Gallipoli"
━━━
Crash report for vg ━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━━━━
Crash report for vg v1.48.0-59-g276aa51e3 "Gallipoli"
━━━Crash report for vg
Crash report for vg v1.48.0-59-g276aa51e3 "Gallipoli"
v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━
Crash report for vg v1.48.0-59-g276aa51e3 "Gallipoli"
━v1.48.0-59-g276aa51e3 "Gallipoli"
━━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━
Crash report for vg ━
Crash report for vg ━v1.48.0-59-g276aa51e3 "Gallipoli"
━━━
Crash report for vg ━━━━━
Crash report for vg v1.48.0-59-g276aa51e3 "Gallipoli"
━━━━━━━━━━
v1.48.0-59-g276aa51e3 "Gallipoli"
Crash report for vg v1.48.0-59-g276aa51e3 "Gallipoli"
━
Crash report for vg v1.48.0-59-g276aa51e3 "Gallipoli"
v1.48.0-59-g276aa51e3 "Gallipoli"
Stack trace (most recent call last)Stack trace (most recent call last)Stack trace (most recent call last)Stack trace (most recent call last)Stack trace (most recent call last) in thread  in thread  in thread  in thread Stack trace (most recent call last) in thread  in thread Stack trace (most recent call last) in thread Stack trace (most recent call last) in thread Stack trace (most recent call last) in thread Stack trace (most recent call last) in thread Stack trace (most recent call last)54597:
Stack trace (most recent call last) in thread 54597:
Stack trace (most recent call last)Stack trace (most recent call last) in thread 54597Stack trace (most recent call last) in thread 54597:
Stack trace (most recent call last)Stack trace (most recent call last)Stack trace (most recent call last)Stack trace (most recent call last)Stack trace (most recent call last) in thread Stack trace (most recent call last) in thread 54597:
Stack trace (most recent call last) in thread 54597:
Stack trace (most recent call last) in thread 54597:
54597:
54597:
Stack trace (most recent call last) in thread 54597:
54597:
 in thread 54597:
 in thread 54597:
Stack trace (most recent call last) in thread 54597:
Stack trace (most recent call last) in thread 54597:
Stack trace (most recent call last) in thread 54597:
 in thread 54597:
Stack trace (most recent call last) in thread 54597:
Stack trace (most recent call last) in thread 54597:
54597:
Stack trace (most recent call last) in thread 54597:
54597:
Stack trace (most recent call last) in thread 54597:
Stack trace (most recent call last) in thread 54597:
 in thread 54597:
54597:
Stack trace (most recent call last) in thread 54597:
Stack trace (most recent call last) in thread 54597:
Stack trace (most recent call last) in thread Stack trace (most recent call last) in thread 54597:
54597:
Stack trace (most recent call last) in thread Stack trace (most recent call last) in thread 54597:
Stack trace (most recent call last) in thread 54597:
Stack trace (most recent call last) in thread 54597:
Stack trace (most recent call last) in thread 54597:
Stack trace (most recent call last) in thread 54597:
 in thread 54597:
Stack trace (most recent call last) in thread 54597:
54597:
Stack trace (most recent call last) in thread 54597:
Stack trace (most recent call last) in thread 54597:
54597:
Stack trace (most recent call last) in thread Stack trace (most recent call last) in thread 54597:
Stack trace (most recent call last) in thread #11   Object "", at #11   Object "", at Stack trace (most recent call last) in thread 54597:
#11   Object "Stack trace (most recent call last) in thread 54597:
#11   Object "", at :
#11   Object "Stack trace (most recent call last) in thread 00, in
#0xa   Object "#0x6#0xb   Object "", at 0, in
#0xa   Object "", at 0, in
#0x9   Object "", at 0, in
Stack trace (most recent call last) in thread 0xd545:
#0xb   Object "", at 0, in
#Stack trace (most recent call last) in thread 0xd545:
#0xb   Object "", at 0, in 0, in
#10   Object "", at 0, in
#Stack trace (most recent call last) in thread 54597:
#11   Object "", at 0, in
#10   Object "", at 0, in
Stack trace (most recent call last) in thread 54597:
#11   Object "Stack trace (most recent call last) in thread 54597:
#11   Object "", at 0, in
#10, in
#10#11#11   Object "", at 0, in
Stack trace (most recent call last) in thread 54597:
#11   Object "", at 0, in
#10   Object "", at 0, in
#10   Object "", at 0, in
#0xd545:
#11   Object "", at 54597:
#11   Object "", at 0, in
#10   Object "#11   Object "", at #0xb   Object "", at 0, in
# 9   Object "", at 0, in
# in thread 0xd545:
#0xb   Object "", at 0#0xb   Object "", at 0, in #0xb   Object "", at #0xb   Object "", at 0#0xb   Object "", at 0, in
Stack trace (most recent call last) in thread 0xd545:
#0xb   Object "", at 0, in
#0xa   Object "", at Stack trace (most recent call last) in thread 0xd545:
##0xb   Object "", at 0, in 0, in
#0xa   Object "", at 0, in
#0x9   Object "", at 0, in
#0x8   Object "", at 54597:
#0xb   Object "", at 0, in #0xb   Object "", at 0, in
#0xa   Object "", at 0, in
#0x9   Object "   Object "", at 0xffffffffffffffff, in
#0x5   Object "", at 0x2063592, in
#0x4Stack trace (most recent call last) in thread 0xd545:
#Stack trace (most recent call last) in thread Stack trace (most recent call last) in thread 0xd545:
#0xb   Object "", at 0, in
#0xa   Object "Stack trace (most recent call last) in thread 0xd545:
#0xb   Object "", at 0, in
   Object "", at 0, in
##0xa   Object "", at 0, in
#0x9   Object "", at 0, in
#0x8   Object "", at Stack trace (most recent call last) in thread 0xd545:
#0xb   Object "", at 0, in
#0xa   Object "#0xb   Object "", at 0, in
#0xb   Object "", at 0, in
#0xa   Object "", at 0, in
#0x9   Object "", at 0, in
#0x8   Object "", at 0, in
#0x7   Object "", at    Object "", at 0, in
   Object "", at 0, in
#0x9   Object "", at 0, in
#0x8   Object "", at 0, in
#0x70xb   Object "", at 0, in
#0xa   Object "", at 0, in
#0xb   Object "", at 0, in
#0xa   Object "#0xa   Object "", at 0#0xa   Object "", at 00, in #6    Object "", at 0xffffffffffffffff, in
#0x5   Object "", at 0x2063592, in
#0x4   Object "", at 0x1b40528, in #0xb   Object "", at 0, in
#0xa", at 0, in
0x9   Object "", at 0, in
#0xa   Object "", at 0, in
#0x9   Object "", at 00, in
", at 0, in
#0xa   Object "", at 0
#0xa   Object "", at 0#0x9   Object "", at 0xd545:
#0xb   Object "", at 0, in
#0xa   Object "", at 0, in
#0x9   Object "", at #0x9   Object "", at 0, in
#0x8   Object "", at 0, in
#0x7   Object "", at 0, in
#0x6, in
#0x9   Object "", at 0, in
#0x8   Object "", at 00x8   Object "", at 0, in , in
#0x8   Object "", at 0, in
#0x7   Object "", at
#0xa   Object "", at 0, in
#0x9   Object "0, in
#0x8   Object "", at 0, in
#0x7   Object "", at 0, in
#0x6   Object "", at 0xffffffffffffffff, in
#0x5   Object "", at 0x2063592, in 0, in
", at 0, in
#0x9   Object "", at 0, in
#0x8   Object "", at 0, in
#0x7   Object "", at 00xd545:
#0xb   Object "", at 0, in
#0xa   Object ", in
#0x9   Object "", at 0, in
#0x8   Object "", at 0, in
#0x7   Object "", at 0, in
#0, in
#7    Object "", at 0, in
#7    Object "", at 0, in
#6    Object "", at 0xffffffffffffffff, in
#5    Object "", at 0x2063592, in
#4    Object "", at 0x1b40528, in
#3    Object "", at 0x1f94ce9, in
#2    Object "", at 0x1f975b7, in
#0x8   Object "", at 0, in
#7    Object "", at 0, in
#6    Object "", at 0xffffffffffffffff, in
#5    Object "", at 0x2063592, in
#11   Object "", at 0, in
#106    Object "", at 0xffffffffffffffff, in
#1    Object "", at 0x1f8ec7b, in
#", at 0, in , in
#10   Object "#6    Object "", at 0xffffffffffffffff, in
0, in
#0xa   Object "", at 0, in
#0x9   Object "", at 0, in
#0x8   Object "", at #0x6   Object "", at 0, in
#0x9   Object "", at 0, in
#0x8   Object "", at 0, in #0x9   Object "", at 0, in
#0x8   Object "#0xa   Object "", at 0, in
 9   Object "", at 0, in
#0x8   Object "", at 0, in
#0x7   Object "", at ", at 0
#0xa   Object "", at 0, in
#", at 0, in
#0x8   Object "", at 0, in
#0x7   Object "", at 0, in , in
#0x6   Object "", at 0xffffffffffffffff, in
#0x5   Object "", at 0x20635920x9   Object "", at 0, in
#0x8", at 0, in
#0x9   Object "", at 0xa   Object "", at 0, in
#0x9   Object ", in
#0x7   Object "", at ", at 0, in
#0xa   Object "0xd545:
#0xb   Object "", at 0, in
#0xa   Object "", at 0, in
#0x9   Object "", at 0, in
#0x8   Object "
##0xa   Object "", at    Object "", at 0, in
#0x9   Object "", at 0, in
#0x8   Object "", at 0, in
#0x70, in
#0x6   Object "", at 0xffffffffffffffff, in
#   Object "", at 0x9   Object "", at 0, in
#0x8   Object "", at 0, in
#0x7   Object "", at
#0x7   Object "", at 0, in #0xb   Object "", at 0, in
#0xa   Object "", at    Object "", at 0, in
#0x9   Object "", at 0, in
#0x8   Object "", at 0, in
#0x7   Object "", at 0, in
#0x6   Object "", at 0xffffffffffffffff, in
#0x5   Object "", at 0    Object "", at 0x10b1754, in
, in
#0x9   Object "", at 0, in
#0x7   Object "", at 0, in
#0x6   Object "", at 0xffffffffffffffff, in
#0x5   Object "", at 0x2063592, in
#0x4   Object "", at ", at 0xffffffffffffffff
#0x3   Object "", at 0x1f94ce9, in
#0x2   Object "", at 0x1f975b7, in
#0x1   Object "", at 0x1f8ec7b/cm/local/apps/slurm/var/spool/job2396054/slurm_script: line 25: 54161 Segmentation fault      (core dumped) vg call -t ${SLURM_CPUS_PER_TASK} FINALGRAPH/newxg.xg -k data/HGDP00607/concat.gam.pack > data/HGDP00607/HGDP00607_gam.vcf 

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: I am not too sure why my error message get multiple times the same error message (maybe due to the multithreading ?).

Stack trace (most recent call last) in thread 54597:

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

vg construct -r ref.fa -v sub-chrXX.vcf.gz > pXX.vg
vg ids -j $(for i in $(seq 1 22); do echo p${i}.vg; done)
vg index -x all.xg $(for i in $(seq 1 22); do echo p${i}.vg; done)
vg prune -t 8 -k 45 -r p${SLURM_ARRAY_TASK_ID}.vg > pruned${SLURM_ARRAY_TASK_ID}.vg
vg index -t 8 --temp-dir temp -g wg.gcsa pruned{1..22}.vg -p -Z 32768 2>&1

From there I wanted concatenate my multiple forward reads using cat *1.fastq.gz > concatenated_1.fastq.gz and my reverse reads using cat *2.fastq.gz > concatenated_2.fastq.gz

From there I wanted to map my paired-end reads together as follow:

vg map -x all.xg -g wg.gcsa -f concatenated_1.fastq.gz -f concatenated_2.fastq.gz > HGDP00607.gam

HOWEVER I had the error : error [xg]: multiple hits for XXX that I am explaining in my BioStars post. So I ended up mapping my forward and reverse reads separately and concatenate them the gam in the next step:

vg map -x all.xg -g wg.gcsa -f HGDP00607/HGDP00607_1.fastq.gz > HGDP00607_1.gam
vg map -x all.xg -g wg.gcsa -f HGDP00607/HGDP00607_2.fastq.gz > HGDP00607_2.gam
cat *.gam > concat.gam
vg pack -x all.xg -g concat.gam -Q 1  -o concat.gam.pack
vg call all.xg -k concat.gam.pack > HGDP00607.vcf

And the error explained before is happening at the last vg call step.

At the same time, I was able to surject the gam file to a bam file and call the variant using HaplotypeCaller as follow:

vg surject -x all.xg -b concat.gam > concat.bam
samtools addreplacerg -r '@RG\tID:samplename\tSM:samplename' concat.bam -o concat_readgroup.bam
samtools sort concat_readgroup.bam > concat_readgroup_sorted.bam
samtools index concat_readgroup_sorted.bam
gatk HaplotypeCaller --input concat.bam --output HGDP00607_bam.vcf --reference ref.fa

The only error I encountered there was a warning: (warning:[vg::get_sequence_dictionary] No reference-sense paths available in the graph; falling back to generic paths.) during the vg surject step.

6. What does running vg version say?

vg version v1.48.0-59-g276aa51e3 "Gallipoli"
Compiled with g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 on Linux
Linked against libstd++ 20210601

EDIT: I also verified all .vg files using vg validate and they all returned valid.

Do you know where this segmentation fault can comes from ? I figured it might be an error from the indexes file but because it took us several month to run the index jobs on our HPC, I am trying to find a way to fix it without re-running those jobs.

Thanks !

nklspp avatar Sep 04 '23 07:09 nklspp