Showing posts from March, 2010

RNA to Protein Translation in PERL

In PERL programming, an RNA sequence can be translated to a protein sequence by substituting equivalent amino acid characters to triplet characters of RNA. This method has followed to find six reading frames (three in the forward direction, and three in the reverse direction). In this program, I have used the associative array (also known as a hash array) to associate triplet characters with amino acid characters. The associate array corresponding to codon table is arranged to 20 amino acid character. The triplet codon table is shown below: 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' =&g