Class: Bio::FinishM::ConnectionInterpreter::Probe
- Inherits:
-
Object
- Object
- Bio::FinishM::ConnectionInterpreter::Probe
- Defined in:
- lib/assembly/connection_interpreter.rb
Instance Attribute Summary collapse
-
#sequence_index ⇒ Object
ID of the underlying sequence as an Integer.
-
#side ⇒ Object
:start or :end.
Instance Method Summary collapse
-
#companion ⇒ Object
Return a probe representing the other side of the contig.
-
#initialize(settable_representation = nil) ⇒ Probe
constructor
A new instance of Probe.
- #to_s ⇒ Object
- #to_settable ⇒ Object
Constructor Details
#initialize(settable_representation = nil) ⇒ Probe
Returns a new instance of Probe.
275 276 277 278 279 280 |
# File 'lib/assembly/connection_interpreter.rb', line 275 def initialize(settable_representation=nil) unless settable_representation.nil? @sequence_index = settable_representation[0] @side = settable_representation[1] end end |
Instance Attribute Details
#sequence_index ⇒ Object
ID of the underlying sequence as an Integer
273 274 275 |
# File 'lib/assembly/connection_interpreter.rb', line 273 def sequence_index @sequence_index end |
#side ⇒ Object
:start or :end
272 273 274 |
# File 'lib/assembly/connection_interpreter.rb', line 272 def side @side end |
Instance Method Details
#companion ⇒ Object
Return a probe representing the other side of the contig
292 293 294 295 296 297 |
# File 'lib/assembly/connection_interpreter.rb', line 292 def companion companion = Probe.new companion.sequence_index = @sequence_index companion.side = @side == :start ? :end : :start return companion end |
#to_s ⇒ Object
286 287 288 289 |
# File 'lib/assembly/connection_interpreter.rb', line 286 def to_s side = @side == :start ? 's' : 'e' "#{@sequence_index}#{side}" end |
#to_settable ⇒ Object
282 283 284 |
# File 'lib/assembly/connection_interpreter.rb', line 282 def to_settable [@sequence_index, @side] end |