def readFastqBlock(file, n=1024):
    """
    Read textual input from the file object `file`, which is assumed
    to be in line-oriented FASTQ format (not full multi-line FASTQ).
    Yields a block of sequences at a time.
    """
    grps = []
    grp = [None, None, None, None]
    i = 0
    for l in file:
        l = l.strip()
        grp[i] = l
        i += 1
        if i == 4:
            grps.append(grp)
            if len(grps) == n:
                yield grps
                grps = []
            grp = [None, None, None, None]
            i = 0
    if i == 4:
        grps.append(grp)
    if len(grps) > 0:
        yield grps
