Class: ViennaRna::Fftbor

Inherits:
Xbor show all
Defined in:
lib/vienna_rna/modules/fftbor.rb

Direct Known Subclasses

Fftbor2d, Ffthairpin, Fftmultiloop

Constant Summary collapse

MODES =
{
  dispatch:   "RNAcentral",
  standalone: "FFTbor"
}

Constants inherited from Xbor

Xbor::BASE_FLAGS

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

batch, bootstrap, #debugger, debugger, exec_exists?, #exec_name, #exec_sequence_format, #initialize, method_added, #pre_run_check, run, #run, #run_with_hooks, #stringify_flags

Constructor Details

This class inherits a constructor from ViennaRna::Base

Instance Method Details

#distributionObject



22
23
24
# File 'lib/vienna_rna/modules/fftbor.rb', line 22

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

#partitionObject



12
13
14
15
# File 'lib/vienna_rna/modules/fftbor.rb', line 12

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

#total_countObject



17
18
19
20
# File 'lib/vienna_rna/modules/fftbor.rb', line 17

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