Error using vg construct: Index is older than VCF (though it's not)
1
0
Entering edit mode
2.5 years ago
Maxine ▴ 50

vg version: v1.41.0 "Salmour",

command line:

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

error:

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

Describe:

I should clarify that the index for vcf is .csi insdead of .tbi because the bufo chromosomes are big so that can not be stored in tbi index. And I'm pretty sure that bufo.12samples.vcf.gz.csi is younger than bufo.12samples.vcf.gz.

Question:

How can I get rid of this error?

Thanks,

Maxine

vg • 2.8k views
ADD COMMENT
0
Entering edit mode

error appears running vg construct: [tabix++] the index file is older than the vcf file. Please use '-f' to overwrite or reindex.

Please use concise titles. Add detailed error messages in the body of the post. I've changed it for you this time.

ADD REPLY
0
Entering edit mode

And I'm pretty sure that bufo.12samples.vcf.gz.csi is younger than bufo.12samples.vcf.gz

Just so you're 100% sure, can you run:

[ bufo.12samples.vcf.gz.csi -nt bufo.12samples.vcf.gz ] && echo "Index is younger"
ADD REPLY
0
Entering edit mode

Yes

$ [ bufo.12samples.vcf.gz.csi -nt bufo.12samples.vcf.gz ] && echo "Index is younger"
Index is younger
-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
ADD REPLY
1
Entering edit mode

This might be a bug in their software - they may have not yet accounted for CSI indices. I think you should open a GitHub issue on their repository and point to this post.

A previous issue indicates that the software thinks a non-existent tbi file is somehow older than the VCF file - this is probably what's happening in your case, given that .tbi does not exist. vg needs to check for a .tbi or a .csi that's created after the VCF.

ADD REPLY
0
Entering edit mode

Sure! Thank you.

ADD REPLY
0
Entering edit mode
2.5 years ago

re-index

bcftools index --tbi --force bufo.12samples.vcf.gz 

or

tabix -p vcf -f bufo.12samples.vcf.gz 
ADD COMMENT
0
Entering edit mode

OP says their index is newer than the VCF. They also say they need to use CSI as TBI doesn't fit their requirements.

ADD REPLY
0
Entering edit mode

tbi index just cannot build even force created.

bcftools index --tbi --force bufo.12samples.vcf.gz 
[E::hts_idx_check_range] Region 961848..611782282 cannot be stored in a tbi index. Try using a csi index
index: failed to create index for "bufo.12samples.vcf.gz"
tabix -p vcf -f bufo.12samples.vcf.gz 
[E::hts_idx_check_range] Region 961848..611782282 cannot be stored in a tbi index. Try using a csi index
tbx_index_build failed: bufo.12samples.vcf.gz
ADD REPLY
1
Entering edit mode

ah sorry, I was too fast ! is vg able to handle large chromosomes ?

ADD REPLY
1
Entering edit mode

I don't think so - they seem to check for a TBI or CSI file (https://github.com/vgteam/vg/blob/2c36d2cd08bef668eca2a8a64ba51abc037c905b/src/index_registry.cpp#L561) before the error message though, so I don't know what's happening.

OP is using a version released on 6-Jun-2022, and this line of code existed before then (whether or not it was executed is not something I can check). Only the devs can answer the question now, and they ask for posts to be opened here on biostars.

ADD REPLY
1
Entering edit mode

OP created a new issue on the GitHub repo. It seems like vg does not (and does not plan to in the immediate future) support CSI indexes.

https://github.com/vgteam/vg/issues/3686

ADD REPLY
0
Entering edit mode

thank you for the update!

ADD REPLY

Login before adding your answer.

Traffic: 1670 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6