text: user1757: I am trying to use GATK IndexFeatureFile to create ".vcf.gz.tbi" 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 ".tbi" 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.
  
  user3351: 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
  
  
original_text: 1757: <p>I am trying to use GATK IndexFeatureFile to create &quot;.vcf.gz.tbi&quot; file. But I have 480 files.</p>
  <p>For the pilot study I used:</p>
  <pre><code>!./gatk IndexFeatureFile -I HG00096.chrom22.bam.10061.vcf.gz -O HG00096.chrom22.bam.10061.vcf.gz.tbi
  </code></pre>
  <p>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?</p>
  <p>I thought</p>
  <pre><code>!./gatk IndexFeatureFile -I *.vcf.gz -O *.vcf.gz.tbi
  </code></pre>
  <p>or maybe not using output argument (just input). I did not worked for me.</p>
   3351: <p>You could run loop over the files in your shell, running a separate command for each file. For example, in <a href="https://www.gnu.org/software/bash/manual/html_node/Looping-Constructs.html" rel="nofollow noreferrer">Bash</a> (or another Bourne shell):</p>
  <pre><code>for file in *.vcf.gz; do ./gatk IndexFeatureFile -I <span class="math-container">${file} -O $</span>{file}.tbi; done
  </code></pre>
  