[Bio] / Sprout / Sapling.pm Repository:
ViewVC logotype

Diff of /Sprout/Sapling.pm

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

revision 1.12, Wed Jul 1 21:35:03 2009 UTC revision 1.13, Wed Jul 15 23:39:58 2009 UTC
# Line 225  Line 225 
225    
226  =item RETURN  =item RETURN
227    
228  Returns a string containing the desired DNA.  Returns a string containing the desired DNA. The DNA comes back in pure lower-case.
229    
230  =back  =back
231    
# Line 904  Line 904 
904      return ($name eq GLOBAL);      return ($name eq GLOBAL);
905  }  }
906    
907    =head3 ContigLength
908    
909        my $contigLen = $sap->ContigLength($contigID);
910    
911    Return the number of base pairs in the specified contig.
912    
913    =over 4
914    
915    =item contigID
916    
917    ID of the contig of interest.
918    
919    =item RETURN
920    
921    Returns the number of base pairs in the specified contig, or 0 if the contig
922    does not exist.
923    
924    =back
925    
926    =cut
927    
928    sub ContigLength {
929        # Get the parameters.
930        my ($self, $contigID) = @_;
931        # Try to find the length.
932        my ($retVal) = $self->GetEntityValues(Contig => $contigID, 'length');
933        # Convert not-found to 0.
934        $retVal = 0 if ! defined $retVal;
935        # Return the result.
936        return $retVal;
937    }
938    
939    
940  =head2 Virtual Methods  =head2 Virtual Methods
941    

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3