Hi, I have a suspicion one or more of my fastq files is corrupted: some reads have sequence and quality of different lengths, for example. Would this python script work to detect a problem?

    import sys
    from Bio import SeqIO
    for record in SeqIO.parse(sys.stdin, "fastq"):
        pass

And I use it like this:

    pigz -dc -p 3 serum-3_2.fq.gz | python check.py

Will it raise an error if one of the reads is non-valid? Or is there a better quick way to check this?
Yes, it raises an error if sequence and quality strings have different length.