PEATDB/DNAtool/primer_database.py
def apply_primer_to_DNA(self,this_primer,DNA_seq,position):

        """Construct new DNA sequence. If we have a negative position,
           then it's a reverse strand primer"""

        if position<0:
            import mutation
            position=abs(int(position))
            repl_seq=mutation.get_reverse_complementary(this_primer['sequence'])
            position=len(DNA_seq)-(position+len(repl_seq))
        else:
            repl_seq=this_primer['sequence']

        # Construct the new DNA
        new_DNA=DNA_seq[:position]+repl_seq+DNA_seq[position+len(repl_seq):]
        return new_DNA
Construct new DNA sequence. If we have a negative position,
           then it's a reverse strand primer
Construct new DNA sequence. If we have a negative position,
then it's a reverse strand primer
Construct new DNA sequence . If we have a negative position then it ' s a reverse strand primer
def apply_primer_to_DNA(self,this_primer,DNA_seq,position):
        if position<0:
            import mutation
            position=abs(int(position))
            repl_seq=mutation.get_reverse_complementary(this_primer['sequence'])
            position=len(DNA_seq)-(position+len(repl_seq))
        else:
            repl_seq=this_primer['sequence']
        new_DNA=DNA_seq[:position]+repl_seq+DNA_seq[position+len(repl_seq):]
        return new_DNA
def apply_primer_to_DNA ( self , this_primer , DNA_seq , position ) : if position < 0 : import mutation position = abs ( int ( position ) ) repl_seq = mutation . get_reverse_complementary ( this_primer [ 'sequence' ] ) position = len ( DNA_seq ) - ( position + len ( repl_seq ) ) else : repl_seq = this_primer [ 'sequence' ] new_DNA = DNA_seq [ : position ] + repl_seq + DNA_seq [ position + len ( repl_seq ) : ] return new_DNA
Construct new DNA sequence.
Construct new DNA sequence .
"""Construct new DNA sequence. If we have a negative position,
           then it's a reverse strand primer""" # Construct the new DNA
self
this_primer
DNA_seq
position