[BioRuby-cvs] bioruby/lib/bio/data aa.rb,0.8,0.9 na.rb,0.9,0.10

Katayama Toshiaki k at pub.open-bio.org
Sun Aug 7 05:58:24 EDT 2005


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

Modified Files:
	aa.rb na.rb 
Log Message:
* fixed Bio::Sequence::AA#molecular_weight to use AminoAcid#weight also


Index: aa.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/data/aa.rb,v
retrieving revision 0.8
retrieving revision 0.9
diff -C2 -d -r0.8 -r0.9
*** aa.rb	7 Aug 2005 08:19:28 -0000	0.8
--- aa.rb	7 Aug 2005 09:58:21 -0000	0.9
***************
*** 117,121 ****
        def weight(x = nil)
          if x
!           Weight[x]
          else
            Weight
--- 117,130 ----
        def weight(x = nil)
          if x
!           if x.length > 1
!             total = 0.0
!             x.each_byte do |byte|
!               aa = byte.chr.upcase
!               total += Weight[aa]
!             end
!             total -= NucleicAcid.weight[:water] * (x.length - 1)
!           else
!             Weight[x]
!           end
          else
            Weight

Index: na.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/data/na.rb,v
retrieving revision 0.9
retrieving revision 0.10
diff -C2 -d -r0.9 -r0.10
*** na.rb	7 Aug 2005 08:19:28 -0000	0.9
--- na.rb	7 Aug 2005 09:58:21 -0000	0.10
***************
*** 2,6 ****
  # bio/data/na.rb - Nucleic Acids
  #
! #   Copyright (C) 2001 KATAYAMA Toshiaki <k at bioruby.org>
  #
  #  This library is free software; you can redistribute it and/or
--- 2,6 ----
  # bio/data/na.rb - Nucleic Acids
  #
! #   Copyright (C) 2001, 2005 KATAYAMA Toshiaki <k at bioruby.org>
  #
  #  This library is free software; you can redistribute it and/or



More information about the bioruby-cvs mailing list