code: def fastqRead(fileHandleOrFile):
      fileHandle = _getFileHandle(fileHandleOrFile)
      line = fileHandle.readline()
      while line != '':
          if line[0] == '@':
              name = line[1:-1]
              seq = fileHandle.readline()[:-1]
              plus = fileHandle.readline()
              if plus[0] != '+':
                  raise RuntimeError("Got unexpected line: %s" % plus)
              qualValues = [ ord(i) for i in fileHandle.readline()[:-1] ]
              if len(seq) != len(qualValues):
                  logger.critical("Got a mismatch between the number of sequence characters (%s) and number of qual values (%s) for sequence: %s, ignoring returning None" % (len(seq), len(qualValues), name))
                  qualValues = None
              else:
                  for i in qualValues:
                      if i < 33 or i > 126:
                          raise RuntimeError("Got a qual value out of range %s (range is 33 to 126)" % i)
              for i in seq:
                  if not ((i >= 'A' and i <= 'Z') or (i >= 'a' and i <= 'z') or i == '-'):
                      raise RuntimeError("Invalid FASTQ character, ASCII code = \'%d\', found in input sequence %s" % (ord(i), name))
              yield name, seq, qualValues
          line = fileHandle.readline()
      if isinstance(fileHandleOrFile, "".__class__):
          fileHandle.close()