code: def _calc_vcf_stats(in_file):
      
      out_file = "%s-stats.yaml" % utils.splitext_plus(in_file)[0]
      if not utils.file_exists(out_file):
          stats = {"avg_depth": _average_called_depth(in_file)}
          with open(out_file, "w") as out_handle:
              yaml.safe_dump(stats, out_handle, default_flow_style=False, allow_unicode=False)
          return stats
      else:
          with open(out_file) as in_handle:
              stats = yaml.safe_load(in_handle)
          return stats
docs: Calculate statistics on VCF for filtering, saving to a file for quick re-runs.