Difference between revisions of "Perl code-CSH"
imported>Chaeshinhyeok (Created page with "<p>#!/usr/bin/perl<br /> use strict;<br /> use warnings;<br /> my @Base = ("T","C","A","G");<br /> my @Prot = ("F","F"...") |
imported>Chaeshinhyeok |
||
(One intermediate revision by the same user not shown) | |||
Line 3: | Line 3: | ||
use warnings;<br /> | use warnings;<br /> | ||
my @Base = ("T","C","A","G");<br /> | my @Base = ("T","C","A","G");<br /> | ||
− | my @Prot = ("F","F","L","L"," | + | my @Prot = ( "F","F","L","L","S","S","S","S",<br /> |
− | " | + | "Y","Y","*","*","C","C","*","W",<br /> |
− | " | + | "L","L","L","L","P","P","P","P",<br /> |
− | " | + | "H","H","Q","Q","R","R","R","R",<br /> |
− | " | + | "I","I","I","M","T","T","T","T",<br /> |
− | "N","N","K","K"," | + | "N","N","K","K","S","S","R","R",<br /> |
− | " | + | "V","V","V","V","A","A","A","A",<br /> |
− | " | + | "D","D","E","E","G","G","G","G");</p> |
<p>for (my $A = 0; $A <=3; $A++){<br /> | <p>for (my $A = 0; $A <=3; $A++){<br /> | ||
Line 28: | Line 28: | ||
<p>$ perl triplet_code.pl<br /> | <p>$ perl triplet_code.pl<br /> | ||
− | TTT=F TTC=F TTA=L TTG=L TCT= | + | TTT=F TTC=F TTA=L TTG=L TCT=S TCC=S TCA=S TCG=S TAT=Y TAC=YTAA=* TAG=* TGT=C TGC=C TGA=* TGG=W CTT=L CTC=L CTA=L CTG=LCCT=P CCC=P CCA=P CCG=P CAT=H CAC=H CAA=Q CAG=Q CGT=R CGC=RCGA=R CGG=R ATT=I ATC=I ATA=I ATG=M ACT=T ACC=T ACA=T ACG=TAAT=N AAC=N AAA=K AAG=K AGT=S AGC=S AGA=R AGG=R GTT=V GTC=VGTA=V GTG=V GCT=A GCC=A GCA=A GCG=A GAT=D GAC=D GAA=E GAG=EGGT=G GGC=G GGA=G GGG=G<br /> |
− | + | <img alt="" src="/ckfinder/userfiles/images/%EC%BA%A1%EC%B2%98(3).PNG" style="height:158px; width:775px" /></p> |
Latest revision as of 22:11, 16 June 2016
#!/usr/bin/perl
use strict;
use warnings;
my @Base = ("T","C","A","G");
my @Prot = ( "F","F","L","L","S","S","S","S",
"Y","Y","*","*","C","C","*","W",
"L","L","L","L","P","P","P","P",
"H","H","Q","Q","R","R","R","R",
"I","I","I","M","T","T","T","T",
"N","N","K","K","S","S","R","R",
"V","V","V","V","A","A","A","A",
"D","D","E","E","G","G","G","G");
for (my $A = 0; $A <=3; $A++){
for (my $B = 0; $B <=3; $B++){
for (my $C = 0; $C <=3; $C++){
print("$Base[$A]","$Base[$B]","$Base[$C]","=",$Prot[16*$A+4*$B+$C],"\t");
}}}
print("\n");
$ perl triplet_code.pl
TTT=F TTC=F TTA=L TTG=L TCT=S TCC=S TCA=S TCG=S TAT=Y TAC=YTAA=* TAG=* TGT=C TGC=C TGA=* TGG=W CTT=L CTC=L CTA=L CTG=LCCT=P CCC=P CCA=P CCG=P CAT=H CAC=H CAA=Q CAG=Q CGT=R CGC=RCGA=R CGG=R ATT=I ATC=I ATA=I ATG=M ACT=T ACC=T ACA=T ACG=TAAT=N AAC=N AAA=K AAG=K AGT=S AGC=S AGA=R AGG=R GTT=V GTC=VGTA=V GTG=V GCT=A GCC=A GCA=A GCG=A GAT=D GAC=D GAA=E GAG=EGGT=G GGC=G GGA=G GGG=G