[BioRuby-cvs] bioruby/lib/bio/db aaindex.rb,1.14,1.15

Mitsuteru C. Nakao nakao at pub.open-bio.org
Mon Nov 7 21:13:46 EST 2005


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

Modified Files:
	aaindex.rb 
Log Message:
* Updated RDoc (Description, Examples, Referencees).
* Removed TAB.


Index: aaindex.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/aaindex.rb,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** aaindex.rb	7 Nov 2005 10:14:28 -0000	1.14
--- aaindex.rb	8 Nov 2005 02:13:44 -0000	1.15
***************
*** 5,15 ****
  # Licence::    LGPL
  #
! #  $Id$
  #
  # == Description
  #
  #
- # == Example
  # == References
  #--
  #
--- 5,27 ----
  # Licence::    LGPL
  #
! # $Id$
  #
  # == Description
+ # Classes for Amino Acid Index Database (AAindex and AAindex2).
+ # * AAindex Manual: http://www.genome.jp/dbget-bin/show_man?aaindex
  #
+ # == Examples
+ #  aax1 = Bio::AAindex1.new("PRAM900102.aaindex1")
+ #  aax1.entry_id
+ #  aax1.index
+ #
+ #  aax2 = Bio::AAindex2.new("HENS920102.aaindex2")
+ #  aax2.entry_id
+ #  aax2.matrix
+ #  aax2.matrix[2,2]
  #
  # == References
+ # * http://www.genome.jp/aaindex/
+ #
  #--
  #
***************
*** 39,51 ****
  
      # Delimiter
!     DELIMITER	="\n//\n"
  
      # Delimiter
      RS = DELIMITER
  
!     #
!     TAGSIZE	= 2
  
-     #
      def initialize(entry)
        super(entry, TAGSIZE)
--- 51,63 ----
  
      # Delimiter
!     DELIMITER ="\n//\n"
  
      # Delimiter
      RS = DELIMITER
  
!     # Bio::DB API
!     TAGSIZE = 2
! 
  
      def initialize(entry)
        super(entry, TAGSIZE)
***************
*** 92,96 ****
    class AAindex1 < AAindex
  
!     #
      def initialize(entry)
        super(entry)
--- 104,108 ----
    class AAindex1 < AAindex
  
! 
      def initialize(entry)
        super(entry)
***************
*** 116,120 ****
            sum += a.to_f
          end
!         mean = sum / values.size	# / 20
          var = 0.0
          values.each do |a|
--- 128,132 ----
            sum += a.to_f
          end
!         mean = sum / values.size # / 20
          var = 0.0
          values.each do |a|
***************
*** 153,157 ****
    class AAindex2 < AAindex
  
!     #
      def initialize(entry)
        super(entry)
--- 165,169 ----
    class AAindex2 < AAindex
  
! 
      def initialize(entry)
        super(entry)
***************
*** 184,190 ****
  
      # Returns
!     def old_matrix	# for AAindex <= ver 5.0
  
!       @aa = {}		# used to determine row/column of the aa
        attr_reader :aa
  
--- 196,202 ----
  
      # Returns
!     def old_matrix # for AAindex <= ver 5.0
  
!       @aa = {} # used to determine row/column of the aa
        attr_reader :aa
  
***************
*** 192,196 ****
  
        case field
!       when / (ARNDCQEGHILKMFPSTWYV)\s+(.*)/	# 20x19/2 matrix
          aalist = $1
          values = $2.split(/\s+/)
--- 204,208 ----
  
        case field
!       when / (ARNDCQEGHILKMFPSTWYV)\s+(.*)/ # 20x19/2 matrix
          aalist = $1
          values = $2.split(/\s+/)
***************
*** 202,206 ****
          ma = Array.new
          20.times do
!           ma.push(Array.new(20))		# 2D array of 20x(20)
          end
  
--- 214,218 ----
          ma = Array.new
          20.times do
!           ma.push(Array.new(20)) # 2D array of 20x(20)
          end
  
***************
*** 213,219 ****
          Matrix[*ma]
  
!       when / -ARNDCQEGHILKMFPSTWYV /		# 21x20/2 matrix (with gap)
          raise NotImplementedError
!       when / ACDEFGHIKLMNPQRSTVWYJ- /		# 21x21 matrix (with gap)
          raise NotImplementedError
        end
--- 225,231 ----
          Matrix[*ma]
  
!       when / -ARNDCQEGHILKMFPSTWYV / # 21x20/2 matrix (with gap)
          raise NotImplementedError
!       when / ACDEFGHIKLMNPQRSTVWYJ- / # 21x21 matrix (with gap)
          raise NotImplementedError
        end



More information about the bioruby-cvs mailing list