RNA to Protein Translation in PERL
BioProgramming March 9th, 2010In PERL programing, RNA sequence is converted into protein sequence by substituting equivalent amino acid characters to triplet characters of RNA. This method is followed to find six reading frame (three in forward direction, and three in reverse direction). In this program, I have used associative array (also known as hash array) to associate triplet characters with amino acid character.
The associate array corresponding to codon table is arranged to 20 amino acid character. The triplet codon table is shown bellow:
Source Code:
print “Enter the RNA sequence: “;
$rna = <>;
chomp($rna);
$rna =~s/[^acgu]//ig;
my $rna = uc($rna);
my(%genetic_code) = (
‘UCA’ => ‘S’, # Serine
‘UCC’ => ‘S’, # Serine
‘UCG’ => ‘S’, # Serine
‘UCU’ => ‘S’, # Serine
‘UUC’ => ‘F’, # Phenylalanine
‘UUU’ => ‘F’, # Phenylalanine
‘UUA’ => ‘L’, # Leucine
‘UUG’ => ‘L’, # Leucine
‘UAC’ => ‘Y’, # Tyrosine
‘UAU’ => ‘Y’, # Tyrosine
‘UAA’ => ‘_’, # Stop
‘UAG’ => ‘_’, # Stop
‘UGC’ => ‘C’, # Cysteine
‘UGU’ => ‘C’, # Cysteine
‘UGA’ => ‘_’, # Stop
‘UGG’ => ‘W’, # Tryptophan
‘CUA’ => ‘L’, # Leucine
‘CUC’ => ‘L’, # Leucine
‘CUG’ => ‘L’, # Leucine
‘CUU’ => ‘L’, # Leucine
‘CCA’ => ‘P’, # Proline
‘CAU’ => ‘H’, # Histidine
‘CAA’ => ‘Q’, # Glutamine
‘CAG’ => ‘Q’, # Glutamine
‘CGA’ => ‘R’, # Arginine
‘CGC’ => ‘R’, # Arginine
‘CGG’ => ‘R’, # Arginine
‘CGU’ => ‘R’, # Arginine
‘AUA’ => ‘I’, # Isoleucine
‘AUC’ => ‘I’, # Isoleucine
‘AUU’ => ‘I’, # Isoleucine
‘AUG’ => ‘M’, # Methionine
‘ACA’ => ‘T’, # Threonine
‘ACC’ => ‘T’, # Threonine
‘ACG’ => ‘T’, # Threonine
‘ACU’ => ‘T’, # Threonine
‘AAC’ => ‘N’, # Asparagine
‘AAU’ => ‘N’, # Asparagine
‘AAA’ => ‘K’, # Lysine
‘AAG’ => ‘K’, # Lysine
‘AGC’ => ‘S’, # Serine
‘AGU’ => ‘S’, # Serine
‘AGA’ => ‘R’, # Arginine
‘AGG’ => ‘R’, # Arginine
‘CCC’ => ‘P’, # Proline
‘CCG’ => ‘P’, # Proline
‘CCU’ => ‘P’, # Proline
‘CAC’ => ‘H’, # Histidine
‘GUA’ => ‘V’, # Valine
‘GUC’ => ‘V’, # Valine
‘GUG’ => ‘V’, # Valine
‘GUU’ => ‘V’, # Valine
‘GCA’ => ‘A’, # Alanine
‘GCC’ => ‘A’, # Alanine
‘GCG’ => ‘A’, # Alanine
‘GCU’ => ‘A’, # Alanine
‘GAC’ => ‘D’, # Aspartic Acid
‘GAU’ => ‘D’, # Aspartic Acid
‘GAA’ => ‘E’, # Glutamic Acid
‘GAG’ => ‘E’, # Glutamic Acid
‘GGA’ => ‘G’, # Glycine
‘GGC’ => ‘G’, # Glycine
‘GGG’ => ‘G’, # Glycine
‘GGU’ => ‘G’ # Glycine
);
my ($protein) = “”;
for(my $i=0;$i<length($rna)-2;$i+=3)
{
$codon = substr($rna,$i,3);
$protein .= $genetic_code{$codon};
}
print “Translated protein sequence is $protein”;
<>;
This program can also used for six reading frame, by changing the three character shift in forward and reverse of the RNA sequence.

March 30th, 2010 at 7:25 PM
My name is Piter Jankovich. oOnly want to tell, that your blog is really cool
And want to ask you: is this blog your hobby?
P.S. Sorry for my bad english
March 30th, 2010 at 10:49 PM
This is awesome….
SleepBarn
April 8th, 2010 at 12:58 PM
heya very good little blogging site ya have here
I apply the matching web theme on my website yet unfortunately for whichever reason it seems to reload at a higher speed on this web site eventhough yours features significantly more material. Have you been getting any specific plug ins or widgets that will quicken it up? If you could possibly write about the programs so I would be able to use them in my personal webpage so twilight new moon users could watch twilight breaking dawn online trailers and videos easier I’d always be happy – regards in advance
April 23rd, 2010 at 3:39 AM
Very good site to learn from. Thanks for sharing.
April 25th, 2010 at 10:49 PM
Your blog is superb I will have to read it all, thank you for the diversion from my homework!
May 6th, 2010 at 1:34 AM
Very nice site!
May 16th, 2010 at 8:15 AM
Wow this is a great resource.. I’m enjoying it.. good article
May 18th, 2010 at 10:34 AM
it is my first post on this web and at first I would like to thank you for the useful information, which I were able to find in this and all previous posts , it really helped me very much. I will definitely add this website on my rss reader
Also, I would like to ask – don’t you mind if I will quate some information from your blog since I am writing articles for the Hub pages, Ezine and other articles directories (this is my part time job)? It would really help me with some of mine articles. Of course, I will mention your website title or URL (not all articles directories allows URL’s , so I can’t 100% promise that you will get a direct backlink to your website).
May 19th, 2010 at 12:02 AM
I have used only basic plugins. Also, in my theme CSS is used instead of more pictures. So, my web page runs faster.
May 27th, 2010 at 6:16 PM
Thanks for the nice blog. I enjoy your writing.
May 27th, 2010 at 6:30 PM
Hello dude, can i post articles to your website ? Let me know if you are interested
May 27th, 2010 at 9:45 PM
The design for your site is a bit off in Galeon. Nonetheless I like your web site. I may have to install a “normal” browser just to enjoy it.
May 28th, 2010 at 3:00 PM
Hello Sir,
I am a old student of NICAS , currently doing research in Systems biology. Can u suggest some good softwares which suits well for protein signalling pathway. Plz do mail me.
May 29th, 2010 at 9:38 PM
its realy a usefull site…
June 2nd, 2010 at 9:19 AM
Thank you for this latest information. Therefore, I would like to ask for your permission to add some of this information in my blog. Of course, I will provide a link to your , as a source of my mentioned information.
June 8th, 2010 at 2:44 PM
Hi
I found RNA to Protein Translation in PERL very useful. Thank you. Is it possible to do translation with multiple entries from the script, when the input sequences are in FASTA format.
once again ,thank u. raghul
June 8th, 2010 at 4:59 PM
Dear Raghul
You can do translation with multiple entries from the script, when the input sequences are in FASTA format.
The matter only lies on accessing the input. But, the concept is same.
June 12th, 2010 at 1:03 AM
Thank you for your article. It’s good to read something related to nitric oxide / l’arginine that actually makes sense. I’ve got a similar website myself, so will keep popping back to see what else you’ve posted.
July 4th, 2010 at 8:13 PM
Sir, this is wonderful. God Bless u!!!