[Bio] / FigKernelPackages / FIG.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/FIG.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.324, Fri Jul 29 22:27:46 2005 UTC revision 1.325, Sun Jul 31 01:09:59 2005 UTC
# Line 11403  Line 11403 
11403  }  }
11404    
11405    
11406  =head3 call_start  =head3 pick_gene_boundaries
11407    
11408  usage: $fig->pick_gene_boundaries($genome,$loc,$translation)  usage: $fig->pick_gene_boundaries($genome,$loc,$translation)
11409    
# Line 11422  Line 11422 
11422    
11423  sub pick_gene_boundaries {  sub pick_gene_boundaries {
11424      my($self,$genome,$loc,$tran) = @_;      my($self,$genome,$loc,$tran) = @_;
11425        my($leftStop,$firstStart,$start,$end,$rightStop);
11426    
11427      my $full_loc = new FullLocation($self,$genome,$loc,$tran);      my $full_loc = new FullLocation($self,$genome,$loc,$tran);
11428        $leftStop = $full_loc->Search("taa|tga|tag",$full_loc->PrevPoint,"-",9000); # attempt to get a stop to the left
11429    
11430      my $leftStop   = $full_loc->Search("taa|tga|tag",$full_loc->PrevPoint,"-",9000);      if (! $leftStop)
11431      my $firstStart = $full_loc->Search("atg|gtg|ttg",$leftStop,"+",9000);      {
11432      my $rightStop  = $full_loc->Search("taa|tga|tag",$full_loc->NextPoint,"+",9000);          $leftStop = $full_loc->ExtremeCodon('first');         # If no stop was found, we start with the first codon
11433      $full_loc->Extend($firstStart,$full_loc->Adjusted($rightStop,-1));      }
11434        if ($firstStart = $full_loc->Search("atg|gtg|ttg", $leftStop,"+",9000)) # if you succeed, attempt to get the first
11435      return ($full_loc->SeedString,$full_loc->Translation);                                                                               # start to the right of it
11436        {
11437            $start = $firstStart; # if you get the start, that is where the actual sequence/tran begin
11438        }
11439        else
11440        {
11441            return undef; # else this cannot be a gene
11442        }
11443        $rightStop  = $full_loc->Search("taa|tga|tag",$full_loc->NextPoint,"+",9000);  # loc for the first stop to the right
11444        if ($rightStop) # if you get it, adjust the position to the third base of the stop codon
11445        {
11446            $end = $full_loc->Adjusted($rightStop,+2);
11447        }
11448        else
11449        {
11450            $end  = $full_loc->Adjusted($full_loc->ExtremeCodon('last')); # else, adjust to the last base of the last codon to the right
11451        }
11452        $full_loc->Extend($start,$end);
11453        my $tran = $full_loc->Translation;
11454        $tran =~ s/\*$//; # The location should contain the stop, but the translation should not
11455        return ($full_loc->SeedString,$tran);
11456  }  }
   
11457    
11458  =head3 change_location_of_feature  =head3 change_location_of_feature
11459    

Legend:
Removed from v.1.324  
changed lines
  Added in v.1.325

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3