def fastqReader(inputFile):
    """A fast and robust fastq parser.

    Deals with multiline sequences and quality scores.
    Allows arbitrary numbers of empty lines anywhere in the file.
    Performs (only) the following file format checks while parsing:
    - each title line MUST start with @ symbol
    - each record MUST have a sequence
    - sequence and quality score of each record MUST be of equal length
    No alphabet checks are done on sequences or quality scores."""
    title_token = ord('@')
    sep_token = ord('+')
    while True:
        try:
            title = next(inputFile)
        except StopIteration:
            return
        if not title[0] == title_token:
            if not title.rstrip():
                continue
            raise AssertionError(
                'Invalid file format: Title line not starting with @')
        title = title.rstrip()
        line_tmp = []
        try:
            while True:
                currentLine = next(inputFile)
                if currentLine[0] == sep_token:
                    break
                line_tmp.append(currentLine.rstrip())
            seq = b''.join(line_tmp)
            seqlen = len(seq)
            if seqlen == 0:
                raise AssertionError(
                    'Invalid file format: Record without sequence')
            quallen = 0
            line_tmp = []
            while seqlen > quallen:
                currentLine = next(inputFile).rstrip()
                line_tmp.append(currentLine)
                quallen += len(currentLine)
        except StopIteration:
            raise AssertionError(
                'Invalid file format: Truncated record at end of file')
        if seqlen < quallen:
            raise AssertionError(
                'Invalid file format: Inconsistent lengths of sequence and quality score'
                )
        qual = b''.join(line_tmp)
        yield title, seq, qual
