I am trying to use vcf-merge. In a separate directory with all files of interest, I have compressed them with bgzip (from a shell script), so they all now have the .gz extension. One must then index these compressed files with the tabix command. On vcf tools, it specifically states that "tabix -p" should be used. To test this out, I used this on two VCF compressed files in another directory, but I got an error message, which reads, "[main] unrecognized preset 'filename.vcf.gz'." However, if I just use "tabix" on the compressed test files, I see the corresponding .tbi file for each .gz file.
Is it all right to just use "tabix" on the compressed files in a shell script, or am I missing a step to use vcf-merge? It states in documentation that VCF files must be position sorted, but I though that these files are already sorted or in position order before compressing.
Thank you for any help.
1 answer
I am filtering vcf for missings vlaues on a subset of individuals in the overall individuals. The same vcf file when stored at 0.3 cutoff, it worked with:
tabix -p file.vcf.gz
and it did not work at the cutoff 0.1 with the same command. However it worked with:
tabix -p vcf file.vcf.gz
Is there something with my vcf file when used a cut-off of less than 0.1? I can say that the script for removing missings based on cutoff worked for several other vcf files and several levels of cut-off, but this specific case troubled me with the first command. I just want to confirm if it is ok. Thnx
Log in to answer this question.
Did you use "tabix -p vcf filename.vcf.gz" (you still need to tell it that the input file is in vcf format (-p vcf). Default is -gff)
No, I didn't. I just used "tabix -p filename.vcf.gz." I will try to see if it works. Thanks for the suggestion!
Tried it on some test files. After using vcf-merge, I think it worked! Thank you.