[BioRuby-cvs] bioruby/lib/bio sequence.rb,0.52,0.53

Katayama Toshiaki k at pub.open-bio.org
Wed Feb 8 17:22:24 UTC 2006


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

Modified Files:
	sequence.rb 
Log Message:
* @seq extends Bio::Sequence::Common to make 'guess' method can find
  composition method on @seq.  This fix is for the 'seq' command in
  BioRuby shell to work.


Index: sequence.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/sequence.rb,v
retrieving revision 0.52
retrieving revision 0.53
diff -C2 -d -r0.52 -r0.53
*** sequence.rb	6 Feb 2006 14:10:01 -0000	0.52
--- sequence.rb	8 Feb 2006 17:22:22 -0000	0.53
***************
*** 4,31 ****
  # Copyright::   Copyright (C) 2000-2006
  #               Toshiaki Katayama <k at bioruby.org>,
! #               Yoshinori K. Okuji <okuji at embug.org>,
  #               Naohisa Goto <ng at bioruby.org>
! # License::     LGPL
  #
  # $Id$
  #
- #--
- #
- #  This library is free software; you can redistribute it and/or
- #  modify it under the terms of the GNU Lesser General Public
- #  License as published by the Free Software Foundation; either
- #  version 2 of the License, or (at your option) any later version.
- #
- #  This library is distributed in the hope that it will be useful,
- #  but WITHOUT ANY WARRANTY; without even the implied warranty of
- #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- #  Lesser General Public License for more details.
- #
- #  You should have received a copy of the GNU Lesser General Public
- #  License along with this library; if not, write to the Free Software
- #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- #
- #++
- #
  
  require 'bio/sequence/compat'
--- 4,13 ----
  # Copyright::   Copyright (C) 2000-2006
  #               Toshiaki Katayama <k at bioruby.org>,
! #               Yoshinori K. Okuji <okuji at enbug.org>,
  #               Naohisa Goto <ng at bioruby.org>
! # License::     Ruby's
  #
  # $Id$
  #
  
  require 'bio/sequence/compat'
***************
*** 35,40 ****
  class Sequence
  
    def initialize(str)
!     @seq = str
    end
  
--- 17,29 ----
  class Sequence
  
+   autoload :Common,  'bio/sequence/common'
+   autoload :NA,      'bio/sequence/na'
+   autoload :AA,      'bio/sequence/aa'
+   autoload :Generic, 'bio/sequence/generic'
+   autoload :Format,  'bio/sequence/format'
+ 
    def initialize(str)
!     @seq = str.dup
!     @seq.extend Bio::Sequence::Common
    end
  
***************
*** 46,55 ****
      :date, :keywords, :dblinks, :taxonomy, :moltype, :seq
  
-   autoload :Common,  'bio/sequence/common'
-   autoload :NA,      'bio/sequence/na'
-   autoload :AA,      'bio/sequence/aa'
-   autoload :Generic, 'bio/sequence/generic'
-   autoload :Format,  'bio/sequence/format'
- 
    def output(style)
      extend Bio::Sequence::Format
--- 35,38 ----
***************
*** 67,77 ****
  
    def self.auto(str)
!     moltype = self.guess(str)
!     if moltype == NA
        @seq = NA.new(str)
      else
        @seq = AA.new(str)
      end
- 
      return @seq
    end
--- 50,59 ----
  
    def self.auto(str)
!     @moltype = self.guess(str)
!     if @moltype == NA
        @seq = NA.new(str)
      else
        @seq = AA.new(str)
      end
      return @seq
    end




More information about the bioruby-cvs mailing list