def get_lengths(fastq): ''' Loop over the fastq file, extract length of sequences ''' return np.array([len(record) for record in SeqIO.parse(fastq, "fastq")])