Skip to content

Commit

Permalink
included adapter checks
Browse files Browse the repository at this point in the history
  • Loading branch information
cmfield committed Sep 22, 2023
1 parent 4f443a6 commit e94d23f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wish_tags_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ def check_tm(seq):
def check_palindrome(seq):
return(fast_rc(seq)!=seq)

def check_hairpins(seq):
def check_hairpins(seq, adapter=None):
if adapter is not None:
seq = adapter+seq
trimers = []
rc_trimers = []
for offset in range(0,3):
Expand Down Expand Up @@ -163,6 +165,8 @@ def gen_primers(l,n,pool):
seqs = filter(check_palindrome, seqs)
seqs = filter(check_runs, seqs)
seqs = filter(check_hairpins, seqs)
seqs = filter(lambda x: check_hairpins(x, 'TCGTCGGCAGCGTCAGATGTGTATAAGAGACAG'))
seqs = filter(lambda x: check_hairpins(x, 'GTCTCGTGGGCTCGGAGATGTGTATAAGAGACAG'))
seqs = list(dict.fromkeys(seqs))
sys.stdout.write("{} of {} random {}mers passed initial checks.\n".format(len(seqs), n, l))
aln = run_bwa(seqs)
Expand Down

0 comments on commit e94d23f

Please sign in to comment.