File size: 565 Bytes
54d5049
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
def ConstructMutant_using_MutationString(wildtype_sequence,mutation):

    digits = [c for c in mutation if c.isdigit()]
    actualresidues=[residue for  residue in mutation if residue.isalpha()]
    digits_to_string="".join(digits)
    digits_to_int=int(digits_to_string)

    pythonb_index_adjusted_digits=digits_to_int-1
    print(pythonb_index_adjusted_digits)
    
    mutated_string=wildtype_sequence[:pythonb_index_adjusted_digits] + actualresidues[1] + wildtype_sequence[pythonb_index_adjusted_digits +1:]
    print(mutated_string)
    return mutated_string