Skip to content

Commit

Permalink
Don't filter for GC content when pruning. Leave to previous
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkjo committed Jan 26, 2022
1 parent bcc9334 commit 467ec0c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions freebarcodes/prune.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 467ec0c

Please sign in to comment.