def split_fasta_on_sample_ids(seqs):
 for (seq_id, seq) in seqs:
  (yield (seq_id.split()[0].rsplit('_', 1)[0], seq_id, seq))
 return

def split_fasta_on_sample_ids ( seqs ) : for ( seq_id , seq ) in seqs : ( yield ( seq_id . split ( ) [ 0 ] . rsplit ( '_' , 1 ) [ 0 ] , seq_id , seq ) ) return
yields for each entry in seqs seqs: pairs .