[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.647, Wed Jan 2 01:42:50 2008 UTC revision 1.648, Sun Jan 20 21:33:42 2008 UTC
# Line 19794  Line 19794 
19794  =cut  =cut
19795    
19796  sub pick_gene_boundaries {  sub pick_gene_boundaries {
19797      my($self,$genome,$loc,$tran) = @_;      my($self,$genome,$loc,$tran,$genetic_code) = @_;
19798    
19799      my($leftStop,$firstStart,$start,$end,$rightStop);      if ($ENV{FIG_VERBOSE}) {
19800            print STDERR "Picking gene boundaries for org=$genome, loc=$loc";
19801            print STDERR ", tran=$tran" if $tran;
19802            print STDERR ", genetic_code=$genetic_code" if $genetic_code;
19803            print STDERR "\n";
19804        }
19805    
19806      my $full_loc = new FullLocation($self,$genome,$loc,$tran);      my($leftStop, $firstStart, $start, $end, $rightStop);
     $leftStop = $full_loc->Search("taa|tga|tag",$full_loc->PrevPoint,"-",9000); # attempt to get a stop to the left  
19807    
19808      if ($leftStop)      my $full_loc = new FullLocation($self, $genome, $loc, $tran, $genetic_code);
19809      {      if ($full_loc->PickGeneBoundaries()) {
19810          if ($firstStart = $full_loc->Search("atg|gtg|ttg", $leftStop,"+",9000)) # if you succeed, attempt to get the first          return ($full_loc->SeedString(), $full_loc->Translation());
                                                                                 # start to the right of it  
         {  
             $start = $firstStart; # if you get the start, that is where the actual sequence/tran begin  
         }  
         else  
         {  
             return undef; # else this cannot be a gene  
         }  
     }  
     else  
     {  
         $start = $full_loc->ExtremeCodon('first');         # If no stop was found, we start with the first codon  
19811      }      }
19812    
19813      $rightStop  = $full_loc->Search("taa|tga|tag",$full_loc->NextPoint,"+",9000);  # loc for the first stop to the right      return (undef, undef);
     if ($rightStop) # if you get it, adjust the position to the third base of the stop codon  
     {  
         $end = $full_loc->Adjusted($rightStop,+2);  
     }  
     else  
     {  
         $end  = $full_loc->ExtremeCodon('last'); # else, adjust to the last base of the last codon to the right  
19814      }      }
19815    
19816      $full_loc->Extend($start,$end,"trim");  
     $tran = $full_loc->Translation;  
     $tran =~ s/\*$//; # The location should contain the stop, but the translation should not  
     return ($full_loc->SeedString,$tran);  
 }  
19817    
19818  =head3 change_location_of_feature  =head3 change_location_of_feature
19819    

Legend:
Removed from v.1.647  
changed lines
  Added in v.1.648

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3