Commit 171c8c32 authored by John Domyancich's avatar John Domyancich
Browse files

Delete DNA-Transcription-and-Translation.ipynb

parent 7eb4dd09
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"# Code challenge: Interpret a DNA sequence into its amino acid sequence\n",
"\n",
"<img src=\"https://s-media-cache-ak0.pinimg.com/originals/70/0e/aa/700eaa15a8f4c8b0c8dee7dfb7058465.jpg\" width=\"300\" ALIGN=\"right\"/>\n",
"\n",
"Because DNA sequences are combinations of letters (strings!), we'll need a new coding concept called \"Methods\" which is python code for modifying string data.\n",
"\n",
"Then, you'll need to use your creativity and investigate some new functions to put it all together to work this complex problem!\n",
"\n",
"## DNA Sequence\n",
"\n",
"\n",
"GGTCAGAAAAAGCCCTCTCCATGTCTACTCACGATACATCCCTGAAAACCACTGAGGAAGTGGC\n",
"TTTTCAGATCATCTTGCTTTGCCAGTTTGGGGTTGGGACTTTTGCCAATGTATTTCTCTTTGTC\n",
"TATAATTTCTCTCCAATCTCGACTGGTTCTAAACAGAGGCCCAGACAAGTGATTTTAAGACACA\n",
"TGGCTGTGGCCAATGCCTTAACTCTCTTCCTCACTATATTTCCAAACAACATGATGACTTTTGC\n",
"TCCAATTATTCCTCAAACTGACCTCAAATGTAAATTAGAATTCTTCACTCGCCTCGTGGCAAGA\n",
"AGCACAAACTTGTGTTCAACTTGTGTTCTGAGTATCCATCAGTTTGTCACACTTGTCCTGTTAA\n",
"TTCAGGTAAAGGAATACTCAGAGCAAGTGTCACAAACATGGCAAGTTATTCTTGTTACAGTTGT\n",
"TGGTTCTTCAGTGTCTTAAATAACATCTACATTCCAATTAAGGTCACTGGTCCACAGTTAACAG\n",
"ACAATAACAATAACTCTAAAAGCAAGTTGTTCTGTTCCACTTCTGATTTCAGTGTAGGCATTGT\n",
"CTTCTTGAGGTTTGCCCATGATGCCACATTCATGAGCATCATGGTCTGGACCAGTGTCTCCATG\n",
"GTACTTCTCCTCCATAGACATTGTCAGAGAATGCAGTACATATTCACTCTCAATCAGGACCCCA\n",
"GGGGCCAAGCAGAGACCACAGCAACCCATACTATCCTGATGCTGGTAGTCACATTTGTTGGCTT\n",
"TTATCTTCTAAGTCTTATTTGTATCATCTTTTACACCTATTTTATATATTCTCATCATTCCCTG\n",
"AGGCATTGCAATGACATTTTGGTTTCGGGTTTCCCTACAATTTCTCCTTTACTGTTGACCTTCA\n",
"GAGACCCTAAGGGTCCTTGTTCTGTGTTCTTCAACTGTTGAAAGCCAGAGTCACTAAAAATGCC\n",
"AAACACAGAAGACAGCTTTGCTAATACCATTAAATACTTTATTCCATAAATATGTTTTTAAAAG\n",
"CTTGTATGAACAAGGTATGGTGCTCACTGCTATACTTATAAAAGAGTAAGGTTATAATCACTTG\n",
"TTGATATGAAAAGATTTCTGGTTGGAATCTGATTGAAACAGTGAGTTATTCACCACCCTCCATTC\n",
"\n",
"## Test DNA Sequence\n",
"\n",
"AGTCAATACGGT"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# Define variable for DNA sequence\n",
"# Define variable for the shorter test DNA sequence"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Matching Base Pairs\n",
"\n",
"First, we'll need to do the transcription, which involves taking a DNA sequence and making the complementary mRNA strand by converting the base pairs. Example:\n",
"\n",
"DNAsequence \"AGTCAATGGTA\"\n",
"mRNAsequence \"UCAGUUACCAU\"\n",
"\n",
"- C's are replaced with G's\n",
"- G's are replaced with C's\n",
"- A's are replaced with U's ** (because there's no thymine in RNA, uracil fills in!) **\n",
"- T's are replaced with A's\n",
"\n",
"# Python String replace() Method\n",
"\n",
"What it does: replaces every instance of a substring you tell it to look for with something new.\n",
"What it outputs: the new string with all of the replacements.\n",
"\n",
"In this example, we've begun the transcription process by substituting the C's with G's in a short DNAsequence example. You can copy the code below and try it out to see what happens:\n",
"\n",
"DNAtranscribed_C = DNAsequence.replace('C', 'G') # Replace cytosine with guanine\n",
"print(DNAtranscribed_C)\n",
"\n",
"# Complete DNA Transcription\n",
"\n",
"Now, modify your code to transcribe the entire DNAsequence to the correct RNA complementary sequence, a variable you should name RNAsequence:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# Substitute base pairs in DNA sequence to transcribe DNA to RNA"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Find the Start Codon\n",
"\n",
"There is a lot of \"junk\" in DNA ... extra amino acids that are unused. So where does the real information begin? Your program needs to start out by reading through the DNA sequence string data to find the important \"start\" codon (AUG), which tells where the real sequence begins.\n",
"\n",
"# Python String find() Method\n",
"\n",
"What it does: Determines if a certain substring is found within a string\n",
"What it outputs: Index (the position in the string) if found or -1 if otherwise\n",
"\n",
"**Remember that Python starts counting at zero!**\n",
"\n",
"Example:\n",
"\n",
"RNAsequence_test = \"AUCGAAUGUUUCGA\" #finding the start codon\n",
"start_codon = RNAsequence_test.find(\"AUG\") #index position of the test start codon\n",
"print (start_codon)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# Find index position of the start codon in your RNA sequence"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"In the space below, you can work to come up with a function to translate your RNA sequence into the protein sequence. Here are some things you will need:\n",
"\n",
"# Dictionary with codons and corresponding amino acid abbreviations\n",
"\n",
"<img src=\"http://hyperphysics.phy-astr.gsu.edu/hbase/Organic/imgorg/gencode.gif\" \"width=300\" align=\"right\"/>\n",
"\n",
" codon_aminoacid = {\"UUU\":\" PHE\", \"UUC\":\" PHE\", \"UUA\":\" LEU\", \"UUG\":\" LEU\", \n",
" \"UCU\":\" SER\", \"UCC\":\" SER\", \"UCA\":\" SER\", \"UCG\":\" SER\", \n",
" \"UAU\":\" TYR\", \"UAC\":\" TYR\", \"UAA\":\"_STOP_\", \"UAG\":\"_STOP_\", \n",
" \"UGU\":\" CYS\", \"UGC\":\" CYS\", \"UGA\":\"_STOP_\", \"UGG\":\" TRP\", \n",
" \"CUU\":\" LEU\", \"CUC\":\" LEU\", \"CUA\":\" LEU\", \"CUG\":\" LEU\",\n",
" \"CCU\":\" PRO\", \"CCC\":\" PRO\", \"CCA\":\" PRO\", \"CCG\":\" PRO\",\n",
" \"CAU\":\" HIS\", \"CAC\":\" HIS\", \"CAA\":\" GIN\", \"CAG\":\" GIN\",\n",
" \"CGU\":\" ARG\", \"CGC\":\" ARG\", \"CGA\":\" ARG\", \"CGG\":\" ARG\",\n",
" \"AUU\":\" ILE\", \"AUC\":\" ILE\", \"AUA\":\" ILE\", \"AUG\":\" MET\",\n",
" \"ACU\":\" THR\", \"ACC\":\" THR\", \"ACA\":\" THR\", \"ACG\":\" THR\",\n",
" \"AAU\":\" ASN\", \"AAC\":\" ASN\", \"AAA\":\" LYS\", \"AAG\":\" LYS\",\n",
" \"AGU\":\" SER\", \"AGC\":\" SER\", \"AGA\":\" ARG\", \"AGG\":\" ARG\",\n",
" \"GUU\":\" VAL\", \"GUC\":\" VAL\", \"GUA\":\" VAL\", \"GUG\":\" VAL\",\n",
" \"GCU\":\" ALA\", \"GCC\":\" ALA\", \"GCA\":\" ALA\", \"GCG\":\" ALA\",\n",
" \"GAU\":\" ASP\", \"GAC\":\" ASP\", \"GAA\":\" GLU\", \"GAG\":\" GLU\",\n",
" \"GGU\":\" GLY\", \"GGC\":\" GLY\", \"GGA\":\" GLY\", \"GGG\":\" GLY\"}\n",
" \n",
" # Some functions and resources to get you started\n",
" \n",
" Learn about these Python functions\n",
" - len() function https://www.tutorialspoint.com/python/list_len.htm\n",
" - int() function http://www.linuxnix.com/pfotd-python-int-function-examples/ \n",
" \n",
" - How to slice up strings\n",
" http://pythoncentral.io/how-to-get-a-substring-from-a-string-in-python-slicing-strings/"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment