Changes

From Biolecture.org

Perl change DNA to AA

2,177 bytes added, 23:09, 22 May 2016
Created page with "<p>#!/usr/bin/perl<br /> use strict;<br /> use warnings;</p> <p><br /> my @bases=("a","t","g","c");<br /> my @AA=("K","N&q..."
<p>#!/usr/bin/perl<br />
use strict;<br />
use warnings;</p>

<p><br />
my @bases=(&quot;a&quot;,&quot;t&quot;,&quot;g&quot;,&quot;c&quot;);<br />
my @AA=(&quot;K&quot;,&quot;N&quot;,&quot;K&quot;,&quot;N&quot;,&quot;I&quot;,&quot;I&quot;,&quot;M&quot;,&quot;I&quot;,&quot;R&quot;,&quot;S&quot;,&quot;R&quot;,&quot;S&quot;,&quot;T&quot;,&quot;T&quot;,&quot;T&quot;,&quot;T&quot;,&quot;.&quot;,&quot;Y&quot;,&quot;.&quot;,&quot;Y&quot;,&quot;L&quot;,&quot;F&quot;,&quot;L&quot;,&quot;F&quot;,<br />
&nbsp;&nbsp;&quot;.&quot;,&quot;C&quot;,&quot;W&quot;,&quot;C&quot;,&quot;S&quot;,&quot;S&quot;,&quot;S&quot;,&quot;S&quot;,&quot;E&quot;,&quot;D&quot;,&quot;E&quot;,&quot;D&quot;,&quot;V&quot;,&quot;V&quot;,&quot;V&quot;,&quot;V&quot;,&quot;G&quot;,&quot;G&quot;,&quot;G&quot;,&quot;G&quot;,&quot;A&quot;,&quot;A&quot;,&quot;A&quot;,&quot;A&quot;,<br />
&nbsp;&nbsp;&quot;Q&quot;,&quot;H&quot;,&quot;Q&quot;,&quot;H&quot;,&quot;L&quot;,&quot;L&quot;,&quot;L&quot;,&quot;L&quot;,&quot;R&quot;,&quot;R&quot;,&quot;R&quot;,&quot;R&quot;,&quot;P&quot;,&quot;P&quot;,&quot;P&quot;,&quot;P&quot;);</p>

<p><br />
for (my $i=0;$i&lt;4;$i++) {<br />
for (my $j=0;$j&lt;4;$j++) {<br />
for (my $k=0;$k&lt;4;$k++) {</p>

<p><br />
&nbsp;print $bases[$i], $bases[$j], $bases[$k], &quot; &quot;,&nbsp; $AA[16*($i)+4*($j)+($k)], &quot;&nbsp; &quot;;<br />
}}<br />
print &quot;\n&quot;;}</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>aaa K&nbsp; aat N&nbsp; aag K&nbsp; aac N&nbsp; ata I&nbsp; att I&nbsp; atg M&nbsp; atc I&nbsp; aga R&nbsp; agt S&nbsp; agg R&nbsp; agc S&nbsp; aca T&nbsp; act T&nbsp; acg T&nbsp; acc T<br />
taa .&nbsp; tat Y&nbsp; tag .&nbsp; tac Y&nbsp; tta L&nbsp; ttt F&nbsp; ttg L&nbsp; ttc F&nbsp; tga .&nbsp; tgt C&nbsp; tgg W&nbsp; tgc C&nbsp; tca S&nbsp; tct S&nbsp; tcg S&nbsp; tcc S<br />
gaa E&nbsp; gat D&nbsp; gag E&nbsp; gac D&nbsp; gta V&nbsp; gtt V&nbsp; gtg V&nbsp; gtc V&nbsp; gga G&nbsp; ggt G&nbsp; ggg G&nbsp; ggc G&nbsp; gca A&nbsp; gct A&nbsp; gcg A&nbsp; gcc A<br />
caa Q&nbsp; cat H&nbsp; cag Q&nbsp; cac H&nbsp; cta L&nbsp; ctt L&nbsp; ctg L&nbsp; ctc L&nbsp; cga R&nbsp; cgt R&nbsp; cgg R&nbsp; cgc R&nbsp; cca P&nbsp; cct P&nbsp; ccg P&nbsp; ccc P</p>

Navigation menu