GATK 4.2 using IndexFeatureFile with multiple files I am trying to use GATK IndexFeatureFile to create &quot;.vcf.gz.tbi&quot; file. But I have 480 files.
For the pilot study I used:
!./gatk IndexFeatureFile -I HG00096.chrom22.bam.10061.vcf.gz -O HG00096.chrom22.bam.10061.vcf.gz.tbi

Doing this procedure for 480 files is not seem very practical. Is there any way to use all file as an input and it takes all files and gives &quot;.tbi&quot; files as an output?
I thought
!./gatk IndexFeatureFile -I *.vcf.gz -O *.vcf.gz.tbi

or maybe not using output argument (just input). I did not worked for me.
You could run loop over the files in your shell, running a separate command for each file. For example, in Bash (or another Bourne shell):
for file in *.vcf.gz; do ./gatk IndexFeatureFile -I ${file} -O ${file}.tbi; done