Class: IntervalList::BasicInterval

Inherits:
Object
  • Object
show all
Includes:
Interval
Defined in:
lib/intervals.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Interval

#above?, #below?, #center, #clone, #contains?, #dist, #intersect, #intersection_size, #nearest, #overlap, #overlaps?, #size, #strict_diff, #strict_overlap, #strict_union

Constructor Details

#initialize(opts) ⇒ BasicInterval

Returns a new instance of BasicInterval.



221
222
223
224
225
226
227
# File 'lib/intervals.rb', line 221

def initialize opts
  @chrom = opts[:chrom]
  @start = opts[:start]
  @stop = opts[:stop]
  @stop = @start = opts[:pos] if opts[:pos]
  @data = opts[:data]
end

Instance Attribute Details

#chromObject

Returns the value of attribute chrom.



219
220
221
# File 'lib/intervals.rb', line 219

def chrom
  @chrom
end

#dataObject

Returns the value of attribute data.



219
220
221
# File 'lib/intervals.rb', line 219

def data
  @data
end

#startObject

Returns the value of attribute start.



219
220
221
# File 'lib/intervals.rb', line 219

def start
  @start
end

#stopObject

Returns the value of attribute stop.



219
220
221
# File 'lib/intervals.rb', line 219

def stop
  @stop
end

Instance Method Details

#copyObject



228
229
230
# File 'lib/intervals.rb', line 228

def copy
  self.class.new :chrom => @chrom, :start => @start, :stop => @stop, :data => @data
end

#inspectObject



231
232
233
# File 'lib/intervals.rb', line 231

def inspect
  "#<#{self.class}:0x#{'%x' % (object_id << 1)} @chrom=#{@chrom} @start=#{@start} @stop=#{@stop}>"
end