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?
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?
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.
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.
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.
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?
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.