Question: Problem with printing continuous minimum and maximum polypurine stretches using sliding window
gravatar for vasubio.mathi
3.5 years ago by
vasubio.mathi0 wrote:

Hi All, I need to extract polypurine stretches with max. 1 pyrimidine residues. my perl code:

for(my $i=0; $i <=$len; $i++) {

for(my $j=0; $j <=length($data[$i]) - $window; $j += $step){
my $nucltde = substr($data[$i], $j, $window);
   while($nucltde =~ /G/g)
#print $nucltde,"\n";
my $Gper=($countG/$window)*100;
#print "$countG\t$Gper\n";
if($Gper >= 50){
    while($nucltde =~ /[AG]/g)
    while($nucltde =~ /[CT]/g)
    my $AGper=($countAG/$window)*100;
    if(($countAG >=15) && ($AGper >= 46) && ($countCT <=1)){

After counting residues and I applied if condition. I could able to print 30nts stretches only. I am not able to print min. of 15nt stretches and maximum of continuous stretches of any length. For that I tried with join and push command. It prints all or joining the same seq. Could you please guide me to solve this problem.

sequence perl • 703 views
ADD COMMENTlink modified 3.5 years ago • written 3.5 years ago by vasubio.mathi0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 839 users visited in the last hour