code: def fasta_idx(in_file, config=None):
      
      fasta_index = in_file + ".fai"
      if not utils.file_exists(fasta_index):
          samtools = config_utils.get_program("samtools", config) if config else "samtools"
          cmd = "{samtools} faidx {in_file}"
          do.run(cmd.format(**locals()), "samtools faidx")
      return fasta_index
docs: Retrieve samtools style fasta index.