Class: ViennaRna::Package::Fftbor

Inherits:
Xbor
  • Object
show all
Defined in:
lib/vienna_rna/package/fftbor.rb

Instance Attribute Summary

Attributes inherited from Base

#data, #response, #runtime

Instance Method Summary collapse

Methods inherited from Xbor

bootstrap_from_file, #expected_k, #full_distribution, #inspect, #k_p_points, parse, #quick_plot, #run_command

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 Method Details

#distributionObject



14
15
16
# File 'lib/vienna_rna/package/fftbor.rb', line 14

def distribution
  self.class.parse(response).map { |row| BigDecimal.new(row[1]) }
end

#partitionObject



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

def partition
  response.split(/\n/).find { |line| line =~ /^Scaling factor.*:\s+(\d+\.\d+)/ }
  BigDecimal.new($1)
end

#total_countObject



9
10
11
12
# File 'lib/vienna_rna/package/fftbor.rb', line 9

def total_count
  response.split(/\n/).find { |line| line =~ /^Number of structures: (\d+)/ }
  $1.to_i
end