Class: Wrnap::Package::Mfpt

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

Instance Attribute Summary collapse

Attributes inherited from Base

#data, #flags, #response, #runtime

Instance Method Summary collapse

Methods inherited from Base

bootstrap, #debugger, #initialize, #inspect

Methods included from Global::Yaml

#deserialize, #serialize

Methods included from Global::Chainer

included

Methods included from Global::Runner

included

Constructor Details

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

Instance Attribute Details

#mfptObject (readonly)

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



11
12
13
# File 'lib/wrnap/package/mfpt.rb', line 11

def mfpt
  @mfpt
end

Instance Method Details

#post_processObject



35
36
37
# File 'lib/wrnap/package/mfpt.rb', line 35

def post_process
  @mfpt = response.to_f
end

#run_command(flags) ⇒ Object



27
28
29
30
31
32
33
# File 'lib/wrnap/package/mfpt.rb', line 27

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

#transform_for_chaining(previous_package) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/wrnap/package/mfpt.rb', line 13

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