diff --git a/freebarcodes/prune.py b/freebarcodes/prune.py index 4aeba22..9995434 100644 --- a/freebarcodes/prune.py +++ b/freebarcodes/prune.py @@ -32,16 +32,12 @@ def is_good_seq(seq): def make_iterator(raw_fpath): bc_list = [line.strip() for line in open(raw_fpath)] + bc_list.sort() bc_len = len(bc_list[0]) assert all(len(bc) == bc_len for bc in bc_list), set(map(len, bc_list)) - GC_max = min(list(range(bc_len)), key=lambda x: abs(float(x)/bc_len-0.6)) - is_good_seq = make_is_good_seq(bc_len - GC_max, GC_max) log.info('Barcode length: {}'.format(bc_len)) - log.info('AT/GC max: {}'.format(GC_max)) log.info('Starting list size: {}'.format(len(bc_list))) - bc_list = [bc for bc in bc_list if is_good_seq(bc)] - log.info('Sequences after initial filtering: {}'.format(len(bc_list))) def iterate_good_barcodes(): for seq in bc_list: yield seqtools.dna2num(seq)