Module 8
Mutations as string changes
Modeling mutations with string operations.
Changes in the sequence
A mutation is a change in the DNA sequence. You can model a point mutation by replacing a character at a specific position.
Python
seq = "ATGC" # Change position 1 from T to G mutated = seq[:1] + "G" + seq[2:] print(mutated)
→ AGGC
Your task
Model a mutation
- Change position 1 of ATGC from T to G.