I've been trying to generate vcf.gz files and associated .vcf.gz.tbi indexes for multiple .vcf files simultaneously. I first ran into the problem of bgzip only creating one .vcf.gz file when I ran;
bgzip *.vcf
However I got round this by running the command several (400) times;
n=0; while [[ $n -lt 400 ]]; do bgzip -i *.vcf; n=$((n+1)); done
I wanted to do the same for tabix so tried to use;
n=0; while [[ $n -lt 400 ]]; do tabix -p vcf *.vcf.gz; n=$((n+1)); done
However this gives me the error;
'Could not load .tbi index of file1.vcf.gz'
This is the first file in the list. Tabix works just fine if I use;
tabix -p vcf file1.vcf.gz
However I don't want to have to type out ~400 odd .vcf.gz file names. Does anyone know why I am having this issue?
Thanks.
bgzip *.vcf
However I got round this by running the command several (400) times;
n=0; while [[ $n -lt 400 ]]; do bgzip -i *.vcf; n=$((n+1)); done
I wanted to do the same for tabix so tried to use;
n=0; while [[ $n -lt 400 ]]; do tabix -p vcf *.vcf.gz; n=$((n+1)); done
However this gives me the error;
'Could not load .tbi index of file1.vcf.gz'
This is the first file in the list. Tabix works just fine if I use;
tabix -p vcf file1.vcf.gz
However I don't want to have to type out ~400 odd .vcf.gz file names. Does anyone know why I am having this issue?
Thanks.
Comment