Class: Bio::Sim4::Report::Segment

Inherits:
Object
  • Object
show all
Defined in:
lib/bio/appl/sim4/report.rb

Overview

Segment informations of a segment pair.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Segment) initialize(pos_st, pos_ed, seq = nil)

Creates a new Segment object. It is designed to be called internally from Bio::Sim4::Report::SegmentPair class. Users shall not use it directly.



253
254
255
256
257
# File 'lib/bio/appl/sim4/report.rb', line 253

def initialize(pos_st, pos_ed, seq = nil)
  @from = pos_st.to_i
  @to   = pos_ed.to_i
  @seq  = seq
end

Instance Attribute Details

- (Object) from (readonly)

start position of the segment (the first position is 1)



259
260
261
# File 'lib/bio/appl/sim4/report.rb', line 259

def from
  @from
end

- (Object) seq (readonly)

sequence (with gaps) of the segment



263
264
265
# File 'lib/bio/appl/sim4/report.rb', line 263

def seq
  @seq
end

- (Object) to (readonly)

end position of the segment (including its position)



261
262
263
# File 'lib/bio/appl/sim4/report.rb', line 261

def to
  @to
end