Changes

From Biolecture.org

Strawberry Perl

2,286 bytes added, 22:32, 9 December 2015
no edit summary
<p>(Although Q&amp;As are poor, Homework 1 process&nbsp;is included in this document.)</p>
 
<p>&nbsp;</p>
 
<p>Q1.&nbsp;What is Strawberry Perl?</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bad - Strawberry Perl is more like Unix program, as its principle is&nbsp;also based on Unix. Although it is efficient to implement Perl tasks(somewhat like text processing),&nbsp;Strawberry&nbsp;Perl shows low&nbsp;compatibility since it&nbsp;is&nbsp;hard to&nbsp;support Windows GUI framework,&nbsp;or enable&nbsp;direct Win32 API access, while other&nbsp;Perl working program&nbsp;does very well.</p>
 
<p>&nbsp;</p>
 
<p>Q. Write&nbsp;a&nbsp;simple&nbsp;program&nbsp;to&nbsp;open&nbsp;and&nbsp;write&nbsp;a&nbsp;FASTA&nbsp;file&nbsp;with&nbsp;the&nbsp;content below:<br />
<br />
&gt;Your_first_seq<br />
ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA<br />
ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA<br />
ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA<br />
ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA</p>
 
<p>&nbsp;</p>
 
<p>A1. Write a Perl code.</p>
 
<p>#!/usr/bin/perl<br />
use strict;<br />
use Bio::SeqIO;<br />
my $reader=new Bio::SeqIO(-format=&gt;&#39;fasta&#39;,-file=&gt;shift);<br />
while (my $seqRec=$reader-&gt;next_seq)<br />
{<br />
&nbsp;&nbsp;&nbsp; print join(&quot;\t&quot;,$seqRec-&gt;id,$seqRec-&gt;length),&quot;\n&quot;;<br />
}</p>
 
<p>A2. When running in console...</p>
 
<p><img alt="" src="/ckfinder/userfiles/images/bandicam%202015-12-09%2021-56-33-538.png" style="height:92px; width:637px" /></p>
 
<p>Then we need to get Bio::SeqIO module.</p>
 
<p>&nbsp;</p>
 
<p>A3. Go to <a href="http://www.bioperl.org/wiki/Module:Bio::SeqIO">http://www.bioperl.org/wiki/Module:Bio::SeqIO</a>&nbsp;to get Bio::SeqIO module</p>
 
<p><img alt="" src="/ckfinder/userfiles/images/bandicam%202015-12-09%2021-58-54-516.png" style="height:103px; width:264px" /></p>
 
<p>A4. Download Bio::SeqIO, and find Bio/SeqIO.pm. As error ment says Bio/SeqIO.pm should be in @INC (C:/Strawberry/perl/site/lib, C:/Strawberry/perl/vendor/lib, C:/Strawberry/perl/lib),</p>
 
<p>&nbsp;Copy and paste Bio folder to the @INC. Even in BioPerl wiki doesn&#39;t teach me where I need to install the module, I added this explanation.</p>
 
<p><img alt="" src="/ckfinder/userfiles/images/bandicam%202015-12-09%2022-02-39-345.png" style="height:67px; width:417px" /></p>
 
<p>&nbsp;</p>
 
<p>A5. Running in the module again, but...</p>
 
<p><img alt="" src="/ckfinder/userfiles/images/bandicam%202015-12-09%2022-06-36-305.png" style="height:84px; width:539px" /></p>
 
<p>&nbsp;</p>
 
<p>A6. Need to revise the code again.</p>
 
<p>Maybe proper input requiring statement would be needed. (Still ongoing)</p>
Anonymous user

Navigation menu