Class: ViennaRna::Package::TabuPath

Inherits:
Base
  • Object
show all
Defined in:
lib/vienna_rna/package/tabu_path.rb

Defined Under Namespace

Classes: Path

Instance Attribute Summary collapse

Attributes inherited from Base

#data, #flags, #response, #runtime

Instance Method Summary collapse

Methods inherited from Base

bootstrap, #debugger, #initialize, #inspect, #serialize

Methods included from Global::ChainExtensions

included

Methods included from Global::RunExtensions

included

Constructor Details

This class inherits a constructor from ViennaRna::Package::Base

Instance Attribute Details

#pathsObject (readonly)

Returns the value of attribute paths.



7
8
9
# File 'lib/vienna_rna/package/tabu_path.rb', line 7

def paths
  @paths
end

Instance Method Details

#post_processObject



23
24
25
# File 'lib/vienna_rna/package/tabu_path.rb', line 23

def post_process
  @paths = response.split(data.str_1 + ?\n).reject(&:empty?).map { |path_string| Path.new(data, path_string) }
end

#run_command(flags) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/vienna_rna/package/tabu_path.rb', line 9

def run_command(flags)
  ViennaRna.debugger { "Running #{exec_name} on #{data.inspect}" }

  [
    exec_name, 
    data.seq.inspect,
    data.str_1.inspect,
    data.str_2.inspect,
    flags[:iterations],
    flags[:min_weight],
    flags[:max_weight]
  ].join(" ")
end