Open main menu

Biolecture.org β

Changes

SeungWon Lee Perl HW

460 bytes added, 02:22, 29 November 2015
no edit summary
<p>A1. the perl code</p>
<pblockquote><textarea cols="30" name="code" rows="20"p>use warnings;<br />use strict;</p>
<p>open my $fh, &#39;&gt;&#39;, &#39;fasta.txt&#39;;</p>
<p>print &quot;enter your fasta file name\n&quot;;<br />my $seqname = &lt;&gt;;<br />print $fh &#39;&gt;&#39;. &quot;$seqname&quot;;</p>
<p>print &quot;enter your fasta sequence(to end inputing sequence, hit 0 and enter)\n&quot;;<br />while (my $line = &lt;STDIN&gt;) {<br /> &nbsp; &nbsp; last if $line =~ &#39;^0$&#39;;<br /> &nbsp; &nbsp; print $fh $line;<br />}</p>
<p>close $fh;</p>
<p>print &quot;done\n&quot;;</textareap></blockquote> <p>&nbsp;</p> <p>download the code&nbsp;<a href="/ckfinder/userfiles/files/fasta_code.txt">/ckfinder/userfiles/files/fasta_code.txt</a></p> <p>the .pl format can&#39;t upload, so I change pl to txt. when you open the file, you have to save as .pl</p>
<p>A2. Running in consol</p>
<p>A3. result file</p>
<p><textarea cols="20" rows="20"blockquote>&gt;Your_first_seq<br />ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA<br />ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA<br />ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA<br />
ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA
ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA<p>&nbsp;</p>ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA</blockquote>ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA</textareap>the file name is fasta.txt (format is txt)&nbsp;</p>
<p>the download file name is :&nbsp;<a href="/ckfinder/userfiles/files/fasta.txt (format is ">/ckfinder/userfiles/files/fasta.txt)</a></p>