def iter_fastq(in_fasta, quals, label_transform=split_lib_transform):
 for (label, seq) in parse_fasta(in_fasta):
  (new_label, qual_id) = label_transform(label)
  seq_id = label.split()[0]
  if seq_id.startswith('>'):
   seq_id = seq_id[1:]
  qual = quals[qual_id]
  (yield (make_fastq_rec(new_label, seq, qual), seq_id))

def iter_fastq ( in_fasta , quals , label_transform = split_lib_transform ) : for ( label , seq ) in parse_fasta ( in_fasta ) : ( new_label , qual_id ) = label_transform ( label ) seq_id = label . split ( ) [ 0 ] if seq_id . startswith ( '>' ) : seq_id = seq_id [ 1 : ] qual = quals [ qual_id ] ( yield ( make_fastq_rec ( new_label , seq , qual ) , seq_id ) )
iterate over fastq records .