code: def collapse(in_file):
      
      keep = Counter()
      with open_fastq(in_file) as handle:
          for line in handle:
              if line.startswith("@"):
                  if line.find("UMI") > -1:
                      logger.info("Find UMI tags in read names, collapsing by UMI.")
                      return collapse_umi(in_file)
                  seq = handle.next().strip()
                  handle.next()
                  qual = handle.next().strip()
                  if seq in keep:
                      keep[seq].update(qual)
                  else:
                      keep[seq] = quality(qual)
      logger.info("Sequences loaded: %s" % len(keep))
      return keep
docs: collapse identical sequences and keep Q