Changes
From Biolecture.org
YMS HW1
,Created page with "<p>==Perl Code==</p> <p><span style="font-family:courier new,courier,monospace">#!/bin/perl -w</span></p> <p><span style="font-family:courier new,courier,monospace">use Bio::Se..."
<p>==Perl Code==</p>
<p><span style="font-family:courier new,courier,monospace">#!/bin/perl -w</span></p>
<p><span style="font-family:courier new,courier,monospace">use Bio::Seq;</span></p>
<p><span style="font-family:courier new,courier,monospace">print "Trial for Homework \"Make a Perl program translating 'all' combinations of triple bases into amino acids\"\n";</span></p>
<p><span style="font-family:courier new,courier,monospace">@bases=("a","t","g","c");<br />
foreach $first(@bases) {<br />
foreach $second(@bases) {<br />
foreach $third(@bases) {</span></p>
<p><span style="font-family:courier new,courier,monospace"> $codon=$first.$second.$third;<br />
$seq_codon = Bio::Seq->new(-seq => $codon,-alphabet => 'dna' );<br />
$aa_letter = $seq_codon->translate;<br />
print "$codon\t",$aa_letter->seq,"\t";</span></p>
<p><span style="font-family:courier new,courier,monospace">}</span><br />
print "\n";<br />
}<br />
}<br />
==Output==</p>
<p>$ perl 1.translation.pl <br />
<span style="font-family:courier new,courier,monospace">Trial for Homework "Make a Perl program translating 'all' combinations of triple bases into amino acids"<br />
aaa K aat N aag K aac N <br />
ata I att I atg M atc I <br />
aga R agt S agg R agc S <br />
aca T act T acg T acc T <br />
taa * tat Y tag * tac Y <br />
tta L ttt F ttg L ttc F <br />
tga * tgt C tgg W tgc C <br />
tca S tct S tcg S tcc S <br />
gaa E gat D gag E gac D <br />
gta V gtt V gtg V gtc V <br />
gga G ggt G ggg G ggc G <br />
gca A gct A gcg A gcc A <br />
caa Q cat H cag Q cac H <br />
cta L ctt L ctg L ctc L <br />
cga R cgt R cgg R cgc R <br />
cca P cct P ccg P ccc P </span></p>
<p><span style="font-family:courier new,courier,monospace">#!/bin/perl -w</span></p>
<p><span style="font-family:courier new,courier,monospace">use Bio::Seq;</span></p>
<p><span style="font-family:courier new,courier,monospace">print "Trial for Homework \"Make a Perl program translating 'all' combinations of triple bases into amino acids\"\n";</span></p>
<p><span style="font-family:courier new,courier,monospace">@bases=("a","t","g","c");<br />
foreach $first(@bases) {<br />
foreach $second(@bases) {<br />
foreach $third(@bases) {</span></p>
<p><span style="font-family:courier new,courier,monospace"> $codon=$first.$second.$third;<br />
$seq_codon = Bio::Seq->new(-seq => $codon,-alphabet => 'dna' );<br />
$aa_letter = $seq_codon->translate;<br />
print "$codon\t",$aa_letter->seq,"\t";</span></p>
<p><span style="font-family:courier new,courier,monospace">}</span><br />
print "\n";<br />
}<br />
}<br />
==Output==</p>
<p>$ perl 1.translation.pl <br />
<span style="font-family:courier new,courier,monospace">Trial for Homework "Make a Perl program translating 'all' combinations of triple bases into amino acids"<br />
aaa K aat N aag K aac N <br />
ata I att I atg M atc I <br />
aga R agt S agg R agc S <br />
aca T act T acg T acc T <br />
taa * tat Y tag * tac Y <br />
tta L ttt F ttg L ttc F <br />
tga * tgt C tgg W tgc C <br />
tca S tct S tcg S tcc S <br />
gaa E gat D gag E gac D <br />
gta V gtt V gtg V gtc V <br />
gga G ggt G ggg G ggc G <br />
gca A gct A gcg A gcc A <br />
caa Q cat H cag Q cac H <br />
cta L ctt L ctg L ctc L <br />
cga R cgt R cgg R cgc R <br />
cca P cct P ccg P ccc P </span></p>