vgteam / vg

tools for working with genome variation graphs
https://biostars.org/tag/vg/
Other
1.11k stars 194 forks source link

Error using vg construct: Index is older than VCF (though it's not) #3686

Open maxineliu opened 2 years ago

maxineliu commented 2 years ago

1. What were you trying to do? I'm tring to construct reference graph bufo.vg using reference genomic.fna, genome index genomic.fna.fai and vcf bufo.12samples.vcf.gz, vcf index bufo.12samples.vcf.gz.csi. I have to generate .csi index instead of .tbi because the bufo chromosomes are too big to be stored in tbi index. I'm pretty sure that bufo.12samples.vcf.gz.csi is younger than bufo.12samples.vcf.gz.

-rw-r----- 1 maxine91 maxine91 1.1G Jun 14 23:15 bufo.12samples.vcf.gz
-rw-r----- 1 maxine91 maxine91 631K Jun 15 13:22 bufo.12samples.vcf.gz.csi

2. What did you want to happen? build bufo.vg

3. What actually happened?

[tabix++] the index file is older than the vcf file. Please use '-f' to overwrite or reindex.

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

./vg construct -r genomic.fna -v bufo.12samples.vcf.gz -t 24 -m 32  > bufo.vg

6. What does running vg version say?

vg: variation graph tool, version v1.41.0 "Salmour"
glennhickey commented 2 years ago

I'm pretty sure that [tabix++] the index file is older than the vcf file. Please use '-f' to overwrite or reindex. is just a an error that vg gives when it can't find the .tbi. So your issue seems to reveal two problems:

maxineliu commented 2 years ago

According to an answer on biostars forum, vg seems trying to check if csi exist before the error msg.

glennhickey commented 2 years ago

Yeah, so biostars points out there's a previous issue about the confusing error message: #1414.

The part about vg not supporting csi indexes seems new to this issue...

maxineliu commented 2 years ago

Yes. no idea if this issue appears results from vg not supporting csi. If so, that is really bad news for me.

glennhickey commented 2 years ago

vg does not support csi

maxineliu commented 2 years ago

Is there a plan to let vg supports csi? Or Any suggestions for my case?

glennhickey commented 2 years ago

Your best bet in the very short term would be to split your chromosome manually.

I think any eventual support in vg for .csi indexes would have to come by way of vcflib. You can try asking at that repo, as it seems to be actively being maintained.

Otherwise, I don't think this is too high on vgteam's radar right now though obviously it'd be nice to support eventually.