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

#initialize(pos_st, pos_ed, seq = nil) ⇒ Segment

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



242
243
244
245
246
# File 'lib/bio/appl/sim4/report.rb', line 242

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

Instance Attribute Details

#fromObject (readonly)

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



248
249
250
# File 'lib/bio/appl/sim4/report.rb', line 248

def from
  @from
end

#seqObject (readonly)

sequence (with gaps) of the segment



252
253
254
# File 'lib/bio/appl/sim4/report.rb', line 252

def seq
  @seq
end

#toObject (readonly)

end position of the segment (including its position)



250
251
252
# File 'lib/bio/appl/sim4/report.rb', line 250

def to
  @to
end