def inflate_denoiser_output(centroid_seqs, singleton_seqs, denoiser_map, raw_seqs):
 id_lookup = parse_denoiser_mapping(denoiser_map)
 flowgram_to_seq_id_lookup = flowgram_id_to_seq_id_map(raw_seqs)
 for (id_, seq) in centroid_seqs:
  (id, cluster_size_str) = id_.split(' | ')
  cluster_member_ids = id_lookup[id]
  for c in cluster_member_ids:
   (yield (flowgram_to_seq_id_lookup[c], seq))
 for (id_, seq) in singleton_seqs:
  (yield (flowgram_to_seq_id_lookup[id_], seq))
 return

def inflate_denoiser_output ( centroid_seqs , singleton_seqs , denoiser_map , raw_seqs ) : id_lookup = parse_denoiser_mapping ( denoiser_map ) flowgram_to_seq_id_lookup = flowgram_id_to_seq_id_map ( raw_seqs ) for ( id_ , seq ) in centroid_seqs : ( id , cluster_size_str ) = id_ . split ( ' | ' ) cluster_member_ids = id_lookup [ id ] for c in cluster_member_ids : ( yield ( flowgram_to_seq_id_lookup [ c ] , seq ) ) for ( id_ , seq ) in singleton_seqs : ( yield ( flowgram_to_seq_id_lookup [ id_ ] , seq ) ) return
expand denoiser fasta files based on denoiser map the inflation process works as follows: write each centroid sequence n times .