Starting off in Bioinformatics — RNA Transcription and Translation | by Vijini Mallawaarachchi | Towards Data Science

In my previous articles, I have introduced DNA and how to turn DNA into proteins. Don’t forget to check them out as well. In this article, we will be covering the following topics.
What is RNA?How to get RNA from DNA?How to turn RNA in to proteins?
What is RNA?
How to get RNA from DNA?
How to turn RNA in to proteins?
At the end of this article, we will be trying out some coding in Python to cover what we have learned.
RNA or ribonucleic acid is a nucleic acid, similar to DNA. However, not like DNA which is very stable, RNA is a much more active member of the nucleic acid family. In the context of bioinformatics, there are only 2 important differences between RNA and DNA:
RNA differs from DNA by one nucleotide.RNA consists of a single strand (one nucleotide), not a helix.
RNA differs from DNA by one nucleotide.
RNA consists of a single strand (one nucleotide), not a helix.
RNA is made up of the following nucleobases,
cytosine (C)guanine (G)adenine (A)uracil (U)
cytosine (C)
guanine (G)
adenine (A)
uracil (U)
along with a sugar called ribose, and a phosphate group. Uracil is the base found in RNA which differs from thymine found in DNA. These nucleobases are connected to one another in a chainlike structure by forming covalent bonds between the sugar of one nucleobase and the phosphate of the next, resulting in an alternating sugar-phosphate backbone, similar to that of a DNA strand. You can read more about the strand formation process in my previous article.
Although RNA molecules are single stranded, still they urge to pair with complementary sequences. Single-stranded RNA molecules pair with different regions of their sequences to form stable double-helical structures. Each RNA molecule tries to pair as many nucleotides as possible, while maintaining their shape. Hairpin shapes as shown in the image below, are the basic elements of an RNA structure. They’re made up of loops (the unpaired C-U in the image) and stems (the paired regions in the image).
Transcription is a process where a strand of DNA is used as a template for constructing a strand of RNA by copying nucleotides one at a time, where uracil is used in place of thymine.
Consider the following DNA string as an example.
AATTTGCTTGGCAAATCGTATGCCTTGGG
You can obtain the relevant RNA string as follows, by replacing all occurrences of T with U.
AAUUUGCUUGGCAAAUCGUAUGCCUUGGG
You can read here about transcription from a more biological point of view.
If you know an RNA sequence, you can translate it into the corresponding protein sequence by using the genetic code. This is the same way the cell itself generates a protein sequence.
The genetic code for RNA (also called RNA codon table) shows how we uniquely relate a 4-nucleotide sequence (A, U, G, C) to a set of 20 amino acids. This is very similar to the DNA codon table discussed in my previous article, but we use “U” instead of “T”. The diagram given below shows the genetic code for RNA in the form of a chart.
First you should get your RNA string.
AUGGCCAUGGCGCCCAGAACUGAGAUCAAUAGUACCCGUAUUAACGGGUGA
Then start reading sequences of 3 nucleotides (one triplet) at a time.
AUG GCC AUG GCG CCC AGA ACU GAG AUC AAU AGU ACC CGU AUU AAC GGG UGA
Now, use the genetic code chart to read which amino acid corresponds to the current triplet (technically referred to as codons). The first circle starting from the center represents the first character of the triplet, the second circle represents the second character and the third circle represents the last character. After translating, you will get the protein sequence which corresponds to the aforementioned RNA sequence.
M A M A P R T E I N S T R I N G STOPM A M A P R T E I N S T R I N G
UAA, UAG and UGA are known as termination signals where you stop the translation process.
An RNA string can be represented using an alphabet as {“A”, “U”, “G”, “C”}. A DNA string can be converted to its corresponding transcribed RNA string by replacing all occurrences of “T” in the DNA string with “U”. Given below is the sample code to obtain the RNA string from a given DNA string. Feel free to try out the code and see what happens.
I have given the following DNA string as input in the sample_dna.txt file.
ATATATCCCGGGAATTTTCGTAGTTAGGCTGATTTTATTGGCGCGAAAATTTTTT
Given below is the output obtained.
Note that all the occurrences of “T” have been replaced with “U”.
The Python code given below takes a RNA sequence and converts it to the corresponding protein sequence. I have created a dictionary to store the information of the genetic code chart. Feel free to try out the code and see what happens.
I have used the same example mentioned above, as input to the sample_rna.txt file.
AUGGCCAUGGCGCCCAGAACUGAGAUCAAUAGUACCCGUAUUAACGGGUGA
Given below are the results.
There is a separate branch in bioinformatics, named as RNA bioinformatics where the main focus of study is on RNA. Many tools and techniques are available at present for analyzing RNA sequences.
Hope you enjoyed reading this article and learned something useful.
Since I’m still very new to this field, I would like to hear your advice. 😇
Stay tuned for my next article on bioinformatics.
Thanks for reading... 😃