Sha256: c987a84db406b24885ec99a03481d065750f77e6cc2eccb715f8300d6863b045

Contents?: true

Size: 935 Bytes

Versions: 12

Compression:

Stored size: 935 Bytes

Contents

#
# bio/util/restriction_enzyme/analysis/fragments.rb - 
#
# 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 Range
class SequenceRange

class Fragments < Array
  
  attr_accessor :primary
  attr_accessor :complement

  def initialize(primary, complement)
    @primary = primary
    @complement = complement
  end

  DisplayFragment = Struct.new(:primary, :complement)

  def for_display(p_str=nil, c_str=nil)
    p_str ||= @primary
    c_str ||= @complement
    pretty_fragments = []
    self.each { |fragment| pretty_fragments << fragment.for_display(p_str, c_str) }
    pretty_fragments
  end
end # Fragments
end # SequenceRange
end # Range
end # RestrictionEnzyme
end # Bio

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
bio-2.0.5 lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb
bio-2.0.4 lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb
bio-2.0.3 lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb
bio-2.0.2 lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb
bio-2.0.1 lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb
bio-2.0.0 lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb
bio-1.6.0.pre.20181210 lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb
bio-1.5.2 lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb
bio-1.5.1 lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb
bio-1.5.0 lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb
bio-1.4.3.0001 lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb
bio-1.4.3 lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb