Class: IntervalList::BasicInterval
- Inherits:
-
Object
- Object
- IntervalList::BasicInterval
- Includes:
- Interval
- Defined in:
- lib/intervals.rb
Instance Attribute Summary collapse
-
#chrom ⇒ Object
Returns the value of attribute chrom.
-
#data ⇒ Object
Returns the value of attribute data.
-
#start ⇒ Object
Returns the value of attribute start.
-
#stop ⇒ Object
Returns the value of attribute stop.
Instance Method Summary collapse
- #copy ⇒ Object
-
#initialize(opts) ⇒ BasicInterval
constructor
A new instance of BasicInterval.
- #inspect ⇒ Object
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
#chrom ⇒ Object
Returns the value of attribute chrom.
219 220 221 |
# File 'lib/intervals.rb', line 219 def chrom @chrom end |
#data ⇒ Object
Returns the value of attribute data.
219 220 221 |
# File 'lib/intervals.rb', line 219 def data @data end |
#start ⇒ Object
Returns the value of attribute start.
219 220 221 |
# File 'lib/intervals.rb', line 219 def start @start end |
#stop ⇒ Object
Returns the value of attribute stop.
219 220 221 |
# File 'lib/intervals.rb', line 219 def stop @stop end |
Instance Method Details
#copy ⇒ Object
228 229 230 |
# File 'lib/intervals.rb', line 228 def copy self.class.new :chrom => @chrom, :start => @start, :stop => @stop, :data => @data end |
#inspect ⇒ Object
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 |