PEATDB/DNAtool/primer_alignment.py
def find_primer_binding_sites_1(self,primer_seq,DNA_seq,rev=None):
        """Find all possible binding sites for the primer in the DNA_seq.
        This function should be changed so we use the scan_primer class in mutation.py"""
        #

        scores=[]
        primer_len=len(primer_seq)
        for pos in range(0,len(DNA_seq)):
            DNA_stretch=DNA_seq[pos:min(pos+primer_len,len(DNA_seq))]
            score=0
            for comp_pos in xrange(min(len(primer_seq),len(DNA_stretch))):
                if DNA_stretch[comp_pos]==primer_seq[comp_pos]:
                    score=score+1
            scores.append([score,pos])
        #
        # Find the ten best binding sites
        #
        scores.sort()
        vals=scores[-10:]
        vals.reverse()
        best_ten=[]
        for pos in vals:
            if not rev:
                best_ten.append([pos[1],pos[0]])
            else:
                best_ten.append([-pos[1],pos[0]])
        return best_ten[:3]
Find all possible binding sites for the primer in the DNA_seq.
        This function should be changed so we use the scan_primer class in mutation.py
Find all possible binding sites for the primer in the DNA_seq.
This function should be changed so we use the scan_primer class in mutation.py
Find all possible binding sites for the primer in the DNA_seq . This function should be changed so we use the scan_primer class in mutation . py
def find_primer_binding_sites_1(self,primer_seq,DNA_seq,rev=None):
        scores=[]
        primer_len=len(primer_seq)
        for pos in range(0,len(DNA_seq)):
            DNA_stretch=DNA_seq[pos:min(pos+primer_len,len(DNA_seq))]
            score=0
            for comp_pos in xrange(min(len(primer_seq),len(DNA_stretch))):
                if DNA_stretch[comp_pos]==primer_seq[comp_pos]:
                    score=score+1
            scores.append([score,pos])
         Find the ten best binding sites
        scores.sort()
        vals=scores[-10:]
        vals.reverse()
        best_ten=[]
        for pos in vals:
            if not rev:
                best_ten.append([pos[1],pos[0]])
            else:
                best_ten.append([-pos[1],pos[0]])
        return best_ten[:3]
def find_primer_binding_sites_1 ( self , primer_seq , DNA_seq , rev = None ) : scores = [ ] primer_len = len ( primer_seq ) for pos in range ( 0 , len ( DNA_seq ) ) : DNA_stretch = DNA_seq [ pos : min ( pos + primer_len , len ( DNA_seq ) ) ] score = 0 for comp_pos in xrange ( min ( len ( primer_seq ) , len ( DNA_stretch ) ) ) : if DNA_stretch [ comp_pos ] == primer_seq [ comp_pos ] : score = score + 1 scores . append ( [ score , pos ] ) scores . sort ( ) vals = scores [ - 10 : ] vals . reverse ( ) best_ten = [ ] for pos in vals : if not rev : best_ten . append ( [ pos [ 1 ] , pos [ 0 ] ] ) else : best_ten . append ( [ - pos [ 1 ] , pos [ 0 ] ] ) return best_ten [ : 3 ]
Find all possible binding sites for the primer in the DNA_seq.
Find all possible binding sites for the primer in the DNA_seq .
"""Find all possible binding sites for the primer in the DNA_seq.
        This function should be changed so we use the scan_primer class in mutation.py""" # # # Find the ten best binding sites #
self
primer_seq
DNA_seq
rev