QLanners Week 2

From LMU BioDB 2017
Jump to: navigation, search

The Genetic Code Assignment

Laboratory Notebook and Answers

I used a combination of my knowledge of DNA transcription and translation from my previous biology classes, along with a little bit of code to do this assignment.

The original template strand provided was:

5’-cgtatgctaataccatgttccgcgtataacccagccgccagttccgctggcggcatttta-3’

The most efficient way I thought of doing this assignment was making a class called DNA that had functions within the class to find the DNA strand's complementary strands and protein sequences from the various reading frames. This class had one provided attribute, which was the sequence of the DNA. I started off by making the variable "templateDNA" of the class "DNA" and "sequence" attribute of the sequence above.

The first step was to create a function that I called "compStrand" to take the input template strand and output the complementary strand. In order to make the code easier, I just took off the 5' and 3' of the string. And then after passing the template DNA strand through the function, I was sure to add the end labels back on, being sure to put them on in the reverse 3' to 5' order. As for the code, the function just iterated through the input string and replaced each letter with its corresponding base (a to t and g to c).

After calling this function on the "templateDNA", the complementary strand was found to be:

3'-gcatacgattatggtacaaggcgcatattgggtcggcggtcaaggcgaccgccgtaaaat-5'

As for the reading frames portion of this assignment, I created another function, called protein, within the class. This function took one argument which was the location of the start of the reading frame. The function shifted the string the appropriate number of spaces to start at that provided location. The function then broke the string into strings of 3 characters and appended each string of three letters to a list called "codons". This list was then iterated through and matched to a value in the dictionary "codontable", which was used from an online source (Swanson, 2013), which had the correct corresponding amino acid letter for each three letter codon code. These amino acid letters were then strung together in a final string called "protein" and printed.

For reading frames +1,+2, and +3, I was able to just use the template DNA strand that was already provided, as this string was oriented in the 5' to 3' direction.

Hence I called the function "protein()" on this strand using the arguments 1, 2 and 3. A "_" in the outputted protein sequence indicated a stop codon, so this was also taken into account, as any codons beyond that point would not be translated. I included the full output from the function called as well in parentheses after the shortened protein sequence. I then added the N and C terminus endings to either end of these output strings. The results were as follows:

+1   N-RMLIPCSAYNPAASSAGGIL-C
+2  N-VC-C   (Full outputted protein sequence from function: N-VC_YHVPRITQPPVPLAAF-C)
+3  N-YANTMFRV-C    (Full outputted protein sequence from function: N-YANTMFRV_PSRQFRWRHF-C)

As for the -1, -2, and -3 reading frames, I had to assign the complementary strand computed above to a new variable (called "compStrand") and then I used the function "compStrand[::-1]" to reverse the order of the complementary strand to the 5' to 3' direction. I then assigned this string as the "sequence" property to a new variable "bottomStrand" of the class "DNA". From here, I called the function protein with arguments 1,2 and 3 as I did above to find the -1, -2 and -3 reading frames from the bottom strand in the 5' to 3' direction. The results were as follows:

-1   Nothing (Full outputted protein sequence from function: N-_NAASGTGGWVIRGTWY_HT-C)
-2   N-KMPPAELAAGLYAEHGISI-C
-3   N-KCRQRNWRLGYTRNMVLAY-C

Finally, to answer the question at the end of the assignment, reading frames +1, -2, and -3 were all open reading frames.


Acknowledgements

  • I texted my homework partner Nicole Kalcic on two occasions over the weekend to ensure that we were both on track and to review each others' pages and answer questions we had regarding the assignment.
  • I referenced the website https://stackoverflow.com/questions/931092/reverse-a-string-in-python for how to best reverse the order of a string in python.
  • While I worked with the people noted above, this individual journal entry was completed by me and not copied from another source.

Qlanners (talk) 22:09, 11 September 2017 (PDT)

References

LMU BioDB 2017. (2017). Week 2. Retrieved September 8, 2017, from https://xmlpipedb.cs.lmu.edu/biodb/fall2017/index.php/Week_2
Swanson, K. E. (2013). Translation DNA to Protein [Forum post]. Retrieved September 8, 2017, from https://stackoverflow.com/questions/19521905/translation-dna-to-protein


Links

Main Page
User Page
Assignment Pages: Week 1 | Week 2 | Week 3 | Week 4 | Week 5 | Week 6 | Week 7 | Week 8 | Week 9 | Week 10 | Week 11 | Week 12 | Week 14 | Week 15
Journal Entry Pages: Week 1 | Week 2 | Week 3 | Week 4 | Week 5 | Week 6 | Week 7 | Week 8 | Week 9 | Week 10 | Week 11 | Week 12 | Week 14 | Week 15
Shared Journal Pages: Week 1 | Week 2 | Week 3 | Week 4 | Week 5 | Week 6 | Week 7 | Week 8 | Week 9 | Week 10
Group Project Page: JASPAR the Friendly Ghost