def libs_from_seqids(seq_ids, delim='_'):
 all_libs = set([i.rsplit(delim, 1)[0] for i in seq_ids])
 return all_libs

def libs_from_seqids ( seq_ids , delim = '_' ) : all_libs = set ( [ i . rsplit ( delim , 1 ) [ 0 ] for i in seq_ids ] ) return all_libs
returns set of libraries .