Difference between revisions of "Perl Homework"
imported>Kujin Kwon (Created page with "<p><perl HW2></p> <p>code:</p> <p>#!/usr/bin/perl<br /> use strict;<br /> use warnings;</p> <p>my @codon = ("A","T","C","G");<br ...") |
(No difference)
|
Revision as of 16:36, 11 June 2016
<perl HW2>
code:
#!/usr/bin/perl
use strict;
use warnings;
my @codon = ("A","T","C","G");
my %triplets = ( "TTT", "F", "TTC", "F", "TTA", "L", "TTG", "L",
"TCT", "S", "TCC", "S", "TCA", "S", "TCG", "S",
"TAT", "Y", "TAC", "Y", "TAA", "*", "TAG", "*",
"TGT", "C", "TGC", "C", "TGA", "*","TGG", "W",
"CTT", "L", "CTC", "L", "CTA", "L","CTG", "L",
"CCT", "P", "CCC", "P", "CCA", "P","CCG", "P",
"CAT", "H", "CAC", "H", "CAA", "Q","CAG", "Q",
"CGT", "R", "CGC", "R", "CGA", "R","CGG", "R",
"ATT", "I", "ATC", "I", "ATA", "I","ATG", "M",
"ACT", "T", "ACC", "T", "ACA", "T","ACG", "T",
"AAT", "N", "AAC", "N", "AAA", "K","AAG", "K",
"AGT", "S", "AGC", "S", "AGA", "R","AGG", "R",
"GTT", "V", "GTC", "V", "GTA", "V","GTG", "V",
"GCT", "A", "GCC", "A", "GCA", "A","GCG", "A",
"GAT", "D", "GAC", "D", "GAA", "E","GAG", "E",
"GGT", "G", "GGC", "G", "GGA", "G","GGG", "G");
foreach my $first (@codon){
foreach my $second (@codon){
foreach my $third (@codon){
my $check = $first . $second . $third;
print "$check : \t";
print "$triplets{$check}\t";
}}}
output>