Changes
From Biolecture.org
Created page with "<p> </p> <p><기본 format></p> <p>#!/usr/bin/perl<br /> # Translate DNA into protein</p> <p>use strict;<br /> use warnings;<br /> use BeginPerlBioinfo;  ..."
<p> </p>
<p><기본 format></p>
<p>#!/usr/bin/perl<br />
# Translate DNA into protein</p>
<p>use strict;<br />
use warnings;<br />
use BeginPerlBioinfo; </p>
<p># Initialize variables<br />
my $dna = '';<br />
my $protein = '';<br />
my $codon;</p>
<p># Translate each three-base codon into an amino acid, and append to a protein <br />
for(my $i=0; $i < (length($dna) - 2) ; $i += 3) {<br />
$codon = substr($dna,$i,3);<br />
$protein .= codon2aa($codon);<br />
}</p>
<p>print "I translated the DNA\n\n$dna\n\n into the protein\n\n$protein\n\n";</p>
<p>exit;</p>
<p><기본 format></p>
<p>#!/usr/bin/perl<br />
# Translate DNA into protein</p>
<p>use strict;<br />
use warnings;<br />
use BeginPerlBioinfo; </p>
<p># Initialize variables<br />
my $dna = '';<br />
my $protein = '';<br />
my $codon;</p>
<p># Translate each three-base codon into an amino acid, and append to a protein <br />
for(my $i=0; $i < (length($dna) - 2) ; $i += 3) {<br />
$codon = substr($dna,$i,3);<br />
$protein .= codon2aa($codon);<br />
}</p>
<p>print "I translated the DNA\n\n$dna\n\n into the protein\n\n$protein\n\n";</p>
<p>exit;</p>