code: def _counts_at_position(positions, orig_reader, cmp_reader):
      
      pos_counts = collections.defaultdict(lambda:
                   collections.defaultdict(lambda:
                   collections.defaultdict(int)))
      for orig_parts in orig_reader:
          cmp_parts = next(cmp_reader)
          for pos in positions:
              try:
                  pos_counts[pos][int(orig_parts[pos+1])][int(cmp_parts[pos+1])] += 1
              except IndexError:
                  pass
      for pos, count_dict in pos_counts.iteritems():
          for orig_val, cmp_dict in count_dict.iteritems():
              for cmp_val, count in cmp_dict.iteritems():
                  yield pos+1, orig_val, cmp_val, count
docs: Combine orignal and new qualities at each position, generating counts.