Sha256: bef996cd083852621ca8ad4835467e0cec36c896641dddff73ef6601cbf6bfb6

Contents?: true

Size: 1.02 KB

Versions: 21

Compression:

Stored size: 1.02 KB

Contents

#
# bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb - Inherits from DoubleStranded::CutLocationPair
#
# Author::    Trevor Wennblom  <mailto:trevor@corevx.com>
# Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com)
# License::   The Ruby License
#
#  $Id: cut_location_pair_in_enzyme_notation.rb,v 1.7 2007/07/16 19:28:48 k Exp $
#

require 'bio/util/restriction_enzyme'

module Bio
class RestrictionEnzyme
class DoubleStranded

# Inherits from DoubleStranded::CutLocationPair , stores the cut location pair in
# enzyme notation instead of 0-based.
#
class CutLocationPairInEnzymeNotation < CutLocationPair

  #########
  protected
  #########

  def validate_2( a, b )
    if (a == 0) or (b == 0)
      raise ArgumentError, "Enzyme index notation only.  0 values are illegal."
    end

    if a == nil and b == nil
      raise ArgumentError, "Neither strand has a cut.  Ambiguous."
    end
  end
end # CutLocationPair
end # DoubleStranded
end # RestrictionEnzyme
end # Bio

Version data entries

21 entries across 21 versions & 5 rubygems

Version Path
bioruby-bio-1.2.9.9001 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
bioruby-bio-1.2.9.9501 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
bioruby-bio-1.3.0.5000 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
bioruby-bio-1.3.0.9901 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
bioruby-bio-1.3.0 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
bioruby-bio-1.3.1.5000 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
jandot-bio-1.2.1 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
ngoto-bio-1.2.9.9001 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
ngoto-bio-1.2.9.9501 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
ngoto-bio-1.3.0.5000 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
ngoto-bio-1.3.0 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
ngoto-bio-1.3.1.5000 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
wwood-bioruby-1.2.11 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
bio-1.4.2 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
bio-1.4.1 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
bio-1.4.0 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
bio-1.3.1 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
bio-1.2.0 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
bio-1.2.1 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb
bio-1.1.0 lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb