code: def process_deltadir(delta_dir, org_lengths, logger=None):
      deltafiles = pyani_files.get_input_files(delta_dir, ".filter")
      results = ANIResults(list(org_lengths.keys()), "ANIm")
      for org, length in list(org_lengths.items()):
          results.alignment_lengths[org][org] = length
      for deltafile in deltafiles:
          qname, sname = os.path.splitext(os.path.split(deltafile)[-1])[0].split("_vs_")
          if qname not in list(org_lengths.keys()):
              if logger:
                  logger.warning(
                      "Query name %s not in input " % qname
                      + "sequence list, skipping %s" % deltafile
                  )
              continue
          if sname not in list(org_lengths.keys()):
              if logger:
                  logger.warning(
                      "Subject name %s not in input " % sname
                      + "sequence list, skipping %s" % deltafile
                  )
              continue
          tot_length, tot_sim_error = parse_delta(deltafile)
          if tot_length == 0 and logger is not None:
              if logger:
                  logger.warning(
                      "Total alignment length reported in " + "%s is zero!" % deltafile
                  )
          query_cover = float(tot_length) / org_lengths[qname]
          sbjct_cover = float(tot_length) / org_lengths[sname]
          try:
              perc_id = 1 - float(tot_sim_error) / tot_length
          except ZeroDivisionError:
              perc_id = 0
              results.zero_error = True
          results.add_tot_length(qname, sname, tot_length)
          results.add_sim_errors(qname, sname, tot_sim_error)
          results.add_pid(qname, sname, perc_id)
          results.add_coverage(qname, sname, query_cover, sbjct_cover)
      return results