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 ...") |
imported>Kujin Kwon |
||
Line 35: | Line 35: | ||
<p>output></p> | <p>output></p> | ||
− | <p> | + | <p><img alt="" src="/ckfinder/userfiles/images/%EC%BA%A1%EC%B2%98(2).PNG" style="height:98px; width:1349px" /></p> |
Latest revision as of 16:39, 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>