// Last changed 1/27/2003 at 10:20am // Assume that the program was invoked with 10 slots in the sequence // array (indexed from 0 to 9). insert 2 DNA AGG // Now we have a sequence inserted insert 3 DNA CUP // This is an error, since P is not a legal letter in the DNA alphabet print // Print out all the sequences in the sequence array. // // 2 DNA AGG print 2 // Print out only the sequence in position 2 of the sequence array // // 2 DNA AGG remove 2 // Remove the sequence in slot 2 print // There is nothing left... should print a message to this effect insert 1 RNA ACCGA // Now we have one sequence, at position 1 copy 1 0 // Now we have a copy in position 0. clip 1 2 4 // We now replace ACCGA with CGA clip 1 1 // We now replace CGA with GA print // 0 RNA ACCGA // 1 RNA GA insert 3 RNA AAAC // Now we have 3 sequences, at positions 0, 1, and 3 print // 0 RNA ACCGA // 1 RNA GA // 3 RNA AAAC swap 1 2 3 1 // Position 2 in the sequence GA is the null, and position 1 in // the sequence AAAC is AAC. So the result is shown by the next print // statement. print // 0 RNA ACCGA // 1 RNA GAAAC // 3 RNA A overlap 0 1 // The best overlap is GA at the end of 0 and at the beginning of 1. insert 3 DNA CAAGT // This replaces the current sequence at position 3 print // 0 RNA ACCGA // 1 RNA GAAAC // 3 DNA CAAGT // Be careful, the blank line that comes next has some spaces in it. transcribe 3 // We see the result of transcribing 3 in the next print statement print 3 // 3 RNA ACUUG // Be sure that you deal with the fact that the input file has a // line at the end that contains only a space.