Difference between revisions of "5. Extract a sequence MKKTGIKG from ASMKATAHQMKKTGIKGMSTYALLRL and print it out in a file MJ"

From Biolecture.org
imported>Myeongji Park
(Created page with "<h1>Idea</h1> <p>Using 's (searching)' function, I search 'MKKTGIKG' sequence and replace to ' ' for extracting this sequence.</p> <h1>Code</h1> <p>#!/...")
 
imported>Myeongji Park
 
Line 22: Line 22:
  
 
<p><img alt="" src="/ckfinder/userfiles/images/1(6).jpg" style="height:226px; width:615px" /></p>
 
<p><img alt="" src="/ckfinder/userfiles/images/1(6).jpg" style="height:226px; width:615px" /></p>
 +
 +
<p>[[http://biolecture.org/index.php/2._Homework]]</p>

Latest revision as of 04:02, 25 May 2017

Idea

Using 's (searching)' function, I search 'MKKTGIKG' sequence and replace to ' ' for extracting this sequence.

Code

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

my $origin_string = 'ASMKATAHQMKKTGIKGMSTYALLRL';
my $string = 'ASMKATAHQMKKTGIKGMSTYALLRL';

print "The original sequence is '", $origin_string, "'\n";

$string =~ s/MKKTGIKG//ig;

print "Result of extracting MKKTGIKG : ", $string, "\n";
exit;

Result

[[1]]