Write a perl script which will insert a single random nucleotide into a randomly selected spot in a sequence.
Random Substitution
Although the DNA of any two people is going to be much more similar than different, there are differences as you would expect. Differences arrise over time due to mutations. Mutations are changes in the DNA sequence. Changes which occur within an exon of a gene usually make the gene non-functional or dysfunctional, but every now and then a mutation occurs which simply changes the function of the gene in a neutral or occassionally positive way. A mutation which results in a positive change is likely to become prevalent since individuals carrying that gene may have a selective advantage.
Mutations can take many forms. Deletions, insertions, and rearrangements are some different ways that a mutation can occur. In this assignment we will consider how to represent a random mutation.
The effect of a single mutation is likely to be quite subtle since gene products interact with different gene products. However, the effects of many mutations accumulated over thousands of generations may become quite noticeable. Although the effect of any single mutation may be of little consequence, the cummulative effects may be of great importance.
So, each time we go through the loop (which is set for 20 iterations) a nucleotide is added to the sequence. If you run the script several times, you should wind up with a whole bunch of different sequences. You could throw an extra print statement within the loop to see the sequence grow one nucleotide at a time per iteration of the loop.
ASSIGNMENT:
Write a perl script which begins by displaying a string containing ten adenines ("AAAAAAAAAA"). Next write a loop which inserts a randomly selected C, G, or T in a random position of the original string and then prints out the modified string (within each iteration of the loop). This loop should iterate 10 times so that the final string will be twenty nucleotides long and may look something like this:
AAGTACAATAGCGAATAGCAObviously your final string may be somewhat different since random nucleotides are being inserted into random positions.