[BioRuby-cvs] bioruby/lib/bio/util restriction_enzyme.rb,1.4,1.5

Trevor Wennblom trevor at dev.open-bio.org
Sun Dec 31 21:50:33 UTC 2006


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

Modified Files:
	restriction_enzyme.rb 
Log Message:
Updated license for RestrictionEnzyme.

Index: restriction_enzyme.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme.rb,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** restriction_enzyme.rb	28 Feb 2006 21:45:56 -0000	1.4
--- restriction_enzyme.rb	31 Dec 2006 21:50:31 -0000	1.5
***************
*** 1,10 ****
  #
! # = bio/util/restriction_enzyme.rb - Digests DNA based on restriction enzyme cut patterns
  #
! # Copyright::  Copyright (C) 2006 Trevor Wennblom <trevor at corevx.com>
! # License::    LGPL
  #
  #  $Id$
  #
  #
  # NOTE: This documentation and the module are still very much under
--- 1,26 ----
  #
! # bio/util/restriction_enzyme.rb - Digests DNA based on restriction enzyme cut patterns
  #
! # 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$
  #
+ 
+ require 'bio/db/rebase'
+ require 'bio/util/restriction_enzyme/double_stranded'
+ require 'bio/util/restriction_enzyme/single_strand'
+ require 'bio/util/restriction_enzyme/cut_symbol'
+ require 'bio/util/restriction_enzyme/analysis'
+ 
+ module Bio #:nodoc:
+ 
+ #
+ # bio/util/restriction_enzyme.rb - Digests DNA based on restriction enzyme cut patterns
+ #
+ # 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
  #
  # NOTE: This documentation and the module are still very much under
***************
*** 12,16 ****
  # comments would be appreciated.
  # 
! # == Synopsis
  # 
  # Bio::RestrictionEnzyme allows you to fragment a DNA strand using one
--- 28,33 ----
  # comments would be appreciated.
  # 
! #
! # = Description
  # 
  # Bio::RestrictionEnzyme allows you to fragment a DNA strand using one
***************
*** 20,30 ****
  # such circumstances.
  # 
! 
! # Using Bio::RestrictionEnzyme you may simply use the name of common
! # enzymes to cut with or you may construct your own unique enzymes to use.
  # 
  # 
! # == Basic Usage
  # 
  #   # EcoRI cut pattern:
  #   #   G|A A T T C
--- 37,49 ----
  # such circumstances.
  # 
! # When using Bio::RestrictionEnzyme you may simply use the name of common
! # enzymes to cut your sequence or you may construct your own unique enzymes 
! # to use.
  # 
  # 
! # = Usage
  # 
+ # == Basic
+ #
  #   # EcoRI cut pattern:
  #   #   G|A A T T C
***************
*** 35,39 ****
  #   #   G^AATTC
  # 
! #   require 'bio/restriction_enzyme'
  #   require 'pp'
  # 
--- 54,58 ----
  #   #   G^AATTC
  # 
! #   require 'bio'
  #   require 'pp'
  # 
***************
*** 66,73 ****
  #   p cuts.complement                     # ["g", "gcccttaa", "cttaa"]
  # 
  # 
! # == Advanced Usage
! # 
! #   require 'bio/restriction_enzyme'
  #   require 'pp'
  #   enzyme_1 = Bio::RestrictionEnzyme.new('anna', [1,1], [3,3])
--- 85,91 ----
  #   p cuts.complement                     # ["g", "gcccttaa", "cttaa"]
  # 
+ # == Advanced
  # 
! #   require 'bio'
  #   require 'pp'
  #   enzyme_1 = Bio::RestrictionEnzyme.new('anna', [1,1], [3,3])
***************
*** 160,209 ****
  # 
  # 
! # == Todo
! # 
! # Currently under development:
  # 
- # * Optimizations in restriction_enzyme/analysis.rb to cut down on
- #   factorial growth of computation space.
  # * Circular DNA cutting
- # * Tagging of sequence data
- # * Much more documentation
- # 
- # 
- #--
- #
- #  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/db/rebase'
! require 'bio/util/restriction_enzyme/double_stranded'
! require 'bio/util/restriction_enzyme/single_strand'
! require 'bio/util/restriction_enzyme/cut_symbol'
! require 'bio/util/restriction_enzyme/analysis'
! 
! 
! module Bio
! 
  class Bio::RestrictionEnzyme
      include CutSymbol
      extend CutSymbol
  
      # Factory for DoubleStranded
      def self.new(users_enzyme_or_rebase_or_pattern, *cut_locations)
        DoubleStranded.new(users_enzyme_or_rebase_or_pattern, *cut_locations)
--- 178,198 ----
  # 
  # 
! # = Currently under development
  # 
  # * Circular DNA cutting
  #
!   
  class Bio::RestrictionEnzyme
      include CutSymbol
      extend CutSymbol
  
+     # [+users_enzyme_or_rebase_or_pattern+] One of three possible parameters:  The name of an enzyme, a REBASE::EnzymeEntry object, or a nucleotide pattern with a cut mark.
+     # [+cut_locations+] The cut locations in enzyme index notation.
+     #
+     # See Bio::RestrictionEnzyme::DoubleStranded.new for more information.
+     #
+     #--
      # Factory for DoubleStranded
+     #++
      def self.new(users_enzyme_or_rebase_or_pattern, *cut_locations)
        DoubleStranded.new(users_enzyme_or_rebase_or_pattern, *cut_locations)
***************
*** 214,219 ****
      # Returns a Bio::REBASE object loaded with all of the enzyme data on file.
      #
!     #def self.rebase(enzymes_yaml = '/home/trevor/tmp5/bioruby/lib/bio/util/restriction_enzyme/enzymes.yaml')
      def self.rebase(enzymes_yaml = File.dirname(__FILE__) + '/restriction_enzyme/enzymes.yaml')
        @@rebase_enzymes ||= Bio::REBASE.load_yaml(enzymes_yaml)
        @@rebase_enzymes
--- 203,212 ----
      # Returns a Bio::REBASE object loaded with all of the enzyme data on file.
      #
!     #--
!     # FIXME: Use File.join
!     #++
      def self.rebase(enzymes_yaml = File.dirname(__FILE__) + '/restriction_enzyme/enzymes.yaml')
+       #def self.rebase(enzymes_yaml = '/home/trevor/tmp5/bioruby/lib/bio/util/restriction_enzyme/enzymes.yaml')
+ 
        @@rebase_enzymes ||= Bio::REBASE.load_yaml(enzymes_yaml)
        @@rebase_enzymes
***************
*** 222,230 ****
      # Primitive way of determining if a string is an enzyme name.
      #
!     # Should work just fine thanks to dumb luck.  A nucleotide or nucleotide
      # set can't ever contain an 'i'.  Restriction enzymes always end in 'i'.
      #
      #--
!     # Could also look for cut symbols.
      #++
      #
--- 215,223 ----
      # Primitive way of determining if a string is an enzyme name.
      #
!     # A nucleotide or nucleotide
      # set can't ever contain an 'i'.  Restriction enzymes always end in 'i'.
      #
      #--
!     # FIXME: Change this to actually look up the enzyme name to see if it's valid.
      #++
      #
***************
*** 238,242 ****
      end
  
! end
! 
  end # Bio
--- 231,234 ----
      end
  
! end # RestrictionEnzyme
  end # Bio




More information about the bioruby-cvs mailing list