Homework 2-1-06

Due: 2-8-06

  • Problem 16 in the Takis Lectures (computer science students should also implement reverse translation) - due Wednesday, February 8th before midnight. Your code should run on Python version 2.2.3 (the version on the Berrypatch machines). Send your completed program to blasiak@brandeis.

  • The data for problem 16 might be difficult to retrieve from the pdf file, so text versions are posted here:
  • Further Instructions
    • You can cut and paste the data into your python program file as a string, or you can read it directly from the file.
      As long as it is clear in your program which method you choose, either is fine.
    • You should not write a command line interface to accept input, just three functions (you can also write other functions that support these as needed):
      1. convert a DNA sequence to a complementary RNA sequence
      2. convert an RNA sequence to a sequence of amino acids
      3. (for computer scientists) convert a sequence of amino acids back to a set of RNA sequences.
        The set of RNA sequences should be in something like regular expression form. For example, the two sequences that can produce 'F' (phenylalanine), "ttt" and "ttc", should appear in the function's output as "tt(c|t)" or "(ttc)|(ttt)".
    • Each function should take a string as input and return a string.
    • The main program should just perform all of these operations in sequence and print the output of each step.