Class: ViennaRna::Package::Mfpt

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

Instance Attribute Summary collapse

Attributes inherited from Base

#data, #response, #runtime

Instance Method Summary collapse

Methods inherited from Base

bootstrap, #debugger, #initialize, #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

#mfptObject (readonly)

These flags aren’t well setup for alternative options at the moment.



8
9
10
# File 'lib/vienna_rna/package/mfpt.rb', line 8

def mfpt
  @mfpt
end

Instance Method Details

#post_processObject



30
31
32
# File 'lib/vienna_rna/package/mfpt.rb', line 30

def post_process
  @mfpt = @response.to_f
end

#run_command(flags) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/vienna_rna/package/mfpt.rb', line 22

def run_command(flags)      
  "%s %s %s" % [
    exec_name, 
    stringify_flags(flags), 
    data.energy_grid_csv
  ]
end

#transform_for_chaining(previous_package) ⇒ Object



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

def transform_for_chaining(previous_package)
  previous_package.data.tap do |data|
    data.instance_eval do
      @energy_grid_csv = Tempfile.new("rna").path.tap do |energy_grid_csv|
        previous_package.to_csv!(energy_grid_csv)
      end
    
      def energy_grid_csv; @energy_grid_csv; end
    end
  end
end