Skip to content

Commit

Permalink
Fix Santalucia_NN_Tm when where is ambigous bases
Browse files Browse the repository at this point in the history
  • Loading branch information
Tao Zhu committed Oct 12, 2019
1 parent 5b616b0 commit 15ee282
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions primerserver2/core/Santalucia_NN_Tm.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,13 @@ def rev_complement(seq):
'-':'-',
'N':'N'}
letters = list(seq)
letters = [basecomplement[base] for base in letters]
complement = (''.join(letters)) #gives the complement of the bases in list letters
newletters = []
for base in letters:
if base in basecomplement:
newletters.append(basecomplement[base])
else:
newletters.append('N')
complement = (''.join(newletters)) #gives the complement of the bases in list letters
return complement[::-1] #gives the reverse of the compliment

def complement(seq):
Expand All @@ -149,8 +154,13 @@ def complement(seq):
'-':'-',
'N':'N'}
letters = list(seq)
letters = [basecomplement[base] for base in letters]
complement = (''.join(letters)) #gives the complement of the bases in list letters
newletters = []
for base in letters:
if base in basecomplement:
newletters.append(basecomplement[base])
else:
newletters.append('N')
complement = (''.join(newletters)) #gives the complement of the bases in list letters
return complement

### FUNCTION TO QC INPUT OLIGO SEQUENCES. (covert the input seq to uppercase, remove any whitespace and characters other than 'A','C','G','T','N','-')
Expand Down

0 comments on commit 15ee282

Please sign in to comment.