Difference between revisions of "User talk:Seung won lee"

From Biolecture.org
imported>S
m (Welcome!)
 
imported>Seung won lee
(Changshin Park Perl programming homework: new section)
 
Line 3: Line 3:
 
You will probably want to read the [[Help:Contents|help pages]].
 
You will probably want to read the [[Help:Contents|help pages]].
 
Again, welcome and have fun! [[User:S|S]] 08:25, 12 September 2015 (KST)
 
Again, welcome and have fun! [[User:S|S]] 08:25, 12 September 2015 (KST)
 +
 +
== Changshin Park Perl programming homework ==
 +
 +
<p>------------------------------------------------------------------------------------------------------</p>
 +
 +
<p>As&nbsp;the&nbsp;first&nbsp;homework,&nbsp;you&nbsp;are&nbsp;asked&nbsp;to<br />
 +
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<br />
 +
below:<br />
 +
<br />
 +
&gt;Your_first_seq<br />
 +
ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA<br />
 +
ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA<br />
 +
ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA<br />
 +
ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA</p>
 +
 +
<p>------------------------------------------------------------------------------------------------------</p>
 +
 +
<p>I made a code simply gets input from user</p>
 +
 +
<p>i am not sure i understood the homework corretly.</p>
 +
 +
<p>This is the code:</p>
 +
 +
<p>#!/usr/bin/perl<br />
 +
use strict;<br />
 +
use warnings;</p>
 +
 +
<p>print &quot;&gt;Input your FASTA file\n&quot;;<br />
 +
my $fasta = &lt;STDIN&gt;;<br />
 +
#chomp $fasta;<br />
 +
chomp($fasta = &lt;STDIN&gt;);</p>
 +
 +
<p><br />
 +
print &quot;$fasta \n&quot;;</p>
 +
 +
<p>&nbsp;</p>
 +
 +
<p>and This is &nbsp;the result:</p>
 +
 +
<p><img alt="" src="/ckfinder/userfiles/images/Perlfasta.JPG" style="height:128px; width:549px" /></p>
 +
 +
<p>&nbsp;</p>
 +
 +
<p>Thank you.</p>

Latest revision as of 02:10, 4 December 2015

Welcome to Biolecture.org! We hope you will contribute much and well. You will probably want to read the help pages. Again, welcome and have fun! S 08:25, 12 September 2015 (KST)

Changshin Park Perl programming homework

------------------------------------------------------------------------------------------------------

As the first homework, you are asked to
write a simple program to open and write a FASTA file with the content
below:

>Your_first_seq
ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA
ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA
ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA
ATATATATATATATATAATATATATATATATATAATATATATATATATATAATATATATATATATATA

------------------------------------------------------------------------------------------------------

I made a code simply gets input from user

i am not sure i understood the homework corretly.

This is the code:

#!/usr/bin/perl
use strict;
use warnings;

print ">Input your FASTA file\n";
my $fasta = <STDIN>;

  1. chomp $fasta;

chomp($fasta = <STDIN>);


print "$fasta \n";

 

and This is  the result:

 

Thank you.