[BioRuby-cvs] bioruby/lib/bio/sequence aa.rb,1.1,1.2

Katayama Toshiaki k at pub.open-bio.org
Mon Feb 6 14:11:33 UTC 2006


Update of /home/repository/bioruby/bioruby/lib/bio/sequence
In directory pub.open-bio.org:/tmp/cvs-serv1897/sequence

Modified Files:
	aa.rb 
Log Message:
* added RDoc header with Ruby's license
* changed to use autoload
* use Bio::AminoAcid explicitly instead of AminoAcid


Index: aa.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/sequence/aa.rb,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** aa.rb	23 Jan 2006 04:13:36 -0000	1.1
--- aa.rb	6 Feb 2006 14:11:31 -0000	1.2
***************
*** 1,8 ****
  module Bio
  
  class Sequence
  
- # Amino Acid sequence
  
  class AA < String
  
--- 1,22 ----
+ #
+ # = bio/sequence/aa.rb - amino acid sequence class
+ #
+ # Copyright::   Copyright (C) 2006
+ #               Toshiaki Katayama <k at bioruby.org>
+ # License::     Ruby's
+ #
+ # $Id$
+ #
+ 
+ require 'bio/sequence/common'
+ 
  module Bio
  
+   autoload :AminoAcid, 'bio/data/aa'
+ 
  class Sequence
  
  
+ # Amino Acid sequence
  class AA < String
  
***************
*** 16,27 ****
    end
  
    # Estimate the weight of this protein.
-   # AminoAcid is defined in bio/data/aa.rb
    def molecular_weight
!     AminoAcid.weight(self)
    end
  
    def to_re
!     AminoAcid.to_re(self)
    end
  
--- 30,41 ----
    end
  
+ 
    # Estimate the weight of this protein.
    def molecular_weight
!     Bio::AminoAcid.weight(self)
    end
  
    def to_re
!     Bio::AminoAcid.to_re(self)
    end
  
***************
*** 31,35 ****
      array = []
      self.each_byte do |x|
!       array.push(AminoAcid.names[x.chr])
      end
      return array
--- 45,49 ----
      array = []
      self.each_byte do |x|
!       array.push(Bio::AminoAcid.names[x.chr])
      end
      return array
***************
*** 39,43 ****
    def names
      self.codes.map do |x|
!       AminoAcid.names[x]
      end
    end
--- 53,57 ----
    def names
      self.codes.map do |x|
!       Bio::AminoAcid.names[x]
      end
    end
***************
*** 48,49 ****
--- 62,64 ----
  
  end # Bio
+ 




More information about the bioruby-cvs mailing list