VCF indexing
2
0
Entering edit mode
6 months ago

Hi all,

Is it required to have the index files for vcf files in the same directory as these vcfs?I'm attempting to create index files by reading vcfs files from a write-protected directory. Thus, I am unable to make index files in the same directory. My goal is to create a multisample vcf file by combining all of the vcfs. When using bcftools merge, is it possible to point to index files that are in a different location than the vcfs? Could anyone help?

Thank you
Athira

vcf • 806 views
ADD COMMENT
0
Entering edit mode

hi, as far as I am aware, there isn't an argument to point to index files in a separate dir (than the vcfs in question). Why not copy the vcfs to a dir. where you have permission, and compress and index?

ADD REPLY
0
Entering edit mode

Copying should be limited to use cases where one knows they'd need to edit the files being copied. If you just need to read from a file located in a different spot, use soft links.

ADD REPLY
0
Entering edit mode
6 months ago
Ram 43k

No, that's not possible. The most efficient way to do this is to create a directory, create soft-links to the VCF files in that directory, then run indexing operations on the soft links. This way, you can use that directory without taking up much additional size (like copying would do) just to address write permission issues. This is also closest to your current situation where you have index files in a different location - just soft link to the VCF files in the location that contains the index files.

ADD COMMENT
0
Entering edit mode
6 months ago

When using bcftools merge, is it possible to point to index files that are in a different location than the vcfs?

yes with option --no-index

    --no-index                    Merge unindexed files, the same chromosomal order is required and -r/-R are not allowed
ADD COMMENT
1
Entering edit mode

Strictly speaking, that option is not for "point... different location", but it works in OP's case. I still think it's better to softlink and create indices.

ADD REPLY

Login before adding your answer.

Traffic: 1628 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