code: def split_snps_indels(orig_file, ref_file, config):
      
      base, ext = utils.splitext_plus(orig_file)
      snp_file = "{base}-snp{ext}".format(base=base, ext=ext)
      indel_file = "{base}-indel{ext}".format(base=base, ext=ext)
      for out_file, select_arg in [(snp_file, "--types snps"),
                                   (indel_file, "--exclude-types snps")]:
          if not utils.file_exists(out_file):
              with file_transaction(config, out_file) as tx_out_file:
                  bcftools = config_utils.get_program("bcftools", config)
                  output_type = "z" if out_file.endswith(".gz") else "v"
                  cmd = "{bcftools} view -O {output_type} {orig_file} {select_arg} > {tx_out_file}"
                  do.run(cmd.format(**locals()), "Subset to SNPs and indels")
          if out_file.endswith(".gz"):
              bgzip_and_index(out_file, config)
      return snp_file, indel_file
docs: Split a variant call file into SNPs and INDELs for processing.