Class: ViennaRna::Package::Population

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

Defined Under Namespace

Classes: Population

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

#population_proportion_for_str_1Object (readonly)

Returns the value of attribute population_proportion_for_str_1.



4
5
6
# File 'lib/vienna_rna/package/population.rb', line 4

def population_proportion_for_str_1
  @population_proportion_for_str_1
end

#population_proportion_str_2_from_str_1Object (readonly)

Returns the value of attribute population_proportion_str_2_from_str_1.



4
5
6
# File 'lib/vienna_rna/package/population.rb', line 4

def population_proportion_str_2_from_str_1
  @population_proportion_str_2_from_str_1
end

Instance Method Details

#post_processObject



31
32
33
34
35
# File 'lib/vienna_rna/package/population.rb', line 31

def post_process
  time_points, proportion_str_2_from_str_1, proportion_for_str_1 = response.split(/\n/).map { |line| line.split(/\t/).map(&:to_f) }.transpose
  @population_proportion_str_2_from_str_1                        = Population.new(time_points, proportion_str_2_from_str_1)
  @population_proportion_for_str_1                               = Population.new(time_points, proportion_for_str_1)
end

#run_command(flags) ⇒ Object



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

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

  "%s %s %s" % [
    exec_name,
    stringify_flags(flags),
    data.temp_fa_file!
  ]
end