Sha256: d9f9349d45f95f3e753b7b8650da42e032ac0bc3db6a8c5db0d4ec9b4c7a8573

Contents?: true

Size: 949 Bytes

Versions: 21

Compression:

Stored size: 949 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
#
#  $Id: fragments.rb,v 1.5 2007/07/16 19:28:48 k Exp $
#

require 'bio/util/restriction_enzyme'

module Bio
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

21 entries across 21 versions & 5 rubygems

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