Sha256: 5281b2833ece6cae6cd3ddcafa38e261a4b427f3cb6909903459e40a3cbfec88
Contents?: true
Size: 1007 Bytes
Versions: 12
Compression:
Stored size: 1007 Bytes
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 # module Bio require 'bio/util/restriction_enzyme' unless const_defined?(:RestrictionEnzyme) 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
12 entries across 12 versions & 1 rubygems