[BioRuby-cvs] bioruby/lib/bio/db rebase.rb,1.4,1.5

Trevor Wennblom trevor at dev.open-bio.org
Sun Dec 31 20:44:23 UTC 2006


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

Modified Files:
	rebase.rb 
Log Message:
Updated license for REBASE.

Index: rebase.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/rebase.rb,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** rebase.rb	28 Feb 2006 21:21:03 -0000	1.4
--- rebase.rb	31 Dec 2006 20:44:21 -0000	1.5
***************
*** 1,12 ****
  #
! # = bio/db/rebase.rb - Interface for EMBOSS formatted REBASE files
  #
! # Copyright::  Copyright (C) 2005 Trevor Wennblom <trevor at corevx.com>
! # License::    LGPL
  #
  #  $Id$
  #
  #
! # == Synopsis
  # 
  # Bio::REBASE provides utilties for interacting with REBASE data in EMBOSS
--- 1,27 ----
  #
! # bio/db/rebase.rb - Interface for EMBOSS formatted REBASE files
  #
! # Author::    Trevor Wennblom  <mailto:trevor at corevx.com>
! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com)
! # License::   Distributes under the same terms as Ruby
  #
  #  $Id$
  #
+ 
+ autoload :YAML, 'yaml'
+ 
+ module Bio #:nodoc:
+ 
+ autoload :Reference, 'bio/reference'
+ 
+ #
+ # bio/db/rebase.rb - Interface for EMBOSS formatted REBASE files
  #
! # Author::    Trevor Wennblom  <mailto:trevor at corevx.com>
! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com)
! # License::   Distributes under the same terms as Ruby
! #
! #
! # = Description
  # 
  # Bio::REBASE provides utilties for interacting with REBASE data in EMBOSS
***************
*** 14,18 ****
  # can be found here:
  # 
- 
  # * http://rebase.neb.com
  # 
--- 29,32 ----
***************
*** 31,37 ****
  # 
  # 
! # == Usage
  # 
! #   require 'bio/db/rebase'
  #   require 'pp'
  # 
--- 45,51 ----
  # 
  # 
! # = Usage
  # 
! #   require 'bio'
  #   require 'pp'
  # 
***************
*** 93,127 ****
  #     pp "#{name}:  #{info.methylation}" unless info.methylation.empty?
  #   end
- # 
- # 
- #--
  #
- #  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
- #
- #++
- #
- 
- autoload :YAML, 'yaml'
- 
- module Bio
- 
-   autoload :Reference, 'bio/reference'
- 
  
  class REBASE
  
!   class DynamicMethod_Hash < Hash
      # Define a writer or reader
      # * Allows hash[:kay]= to be accessed like hash.key=
--- 107,115 ----
  #     pp "#{name}:  #{info.methylation}" unless info.methylation.empty?
  #   end
  #
  
  class REBASE
  
!   class DynamicMethod_Hash < Hash #:nodoc:
      # Define a writer or reader
      # * Allows hash[:kay]= to be accessed like hash.key=
***************
*** 143,147 ****
    end
  
!   class EnzymeEntry < DynamicMethod_Hash
      @@supplier_data = {}
      def self.supplier_data=(d); @@supplier_data = d; end
--- 131,135 ----
    end
  
!   class EnzymeEntry < DynamicMethod_Hash #:nodoc:
      @@supplier_data = {}
      def self.supplier_data=(d); @@supplier_data = d; end
***************
*** 154,157 ****
--- 142,146 ----
    end
  
+   # Iterate over each entry
    def each
      @data.each { |v| yield v }
***************
*** 162,166 ****
    #  def []( key ); @data[ key ]; end
    #  def size; @data.size; end
!   def method_missing(method_id, *args)
      self.class.class_eval do
        define_method(method_id) { |a| Hash.instance_method(method_id).bind(@data).call(a) }
--- 151,155 ----
    #  def []( key ); @data[ key ]; end
    #  def size; @data.size; end
!   def method_missing(method_id, *args) #:nodoc:
      self.class.class_eval do
        define_method(method_id) { |a| Hash.instance_method(method_id).bind(@data).call(a) }
***************
*** 169,174 ****
    end
  
!   # All your REBASE are belong to us.
    def initialize( enzyme_lines, reference_lines = nil, supplier_lines = nil, yaml = false )
      if yaml
        @enzyme_data = enzyme_lines
--- 158,168 ----
    end
  
!   # [+enzyme_lines+] contents of EMBOSS formatted enzymes file (_required_)
!   # [+reference_lines+] contents of EMBOSS formatted references file (_optional_)
!   # [+supplier_lines+] contents of EMBOSS formatted suppliers files (_optional_)
!   # [+yaml+] enzyme_lines, reference_lines, and supplier_lines are read as YAML if set to true (_default_ +false+)
    def initialize( enzyme_lines, reference_lines = nil, supplier_lines = nil, yaml = false )
+     # All your REBASE are belong to us.
+ 
      if yaml
        @enzyme_data = enzyme_lines
***************
*** 410,413 ****
  
  end # REBASE
- 
  end # Bio
--- 404,406 ----




More information about the bioruby-cvs mailing list