Class: GammaScorer

Inherits:
Raxml
  • Object
show all
Includes:
TreeCheck
Defined in:
lib/rraxml.rb

Instance Attribute Summary

Attributes inherited from Raxml

#binary, #infofile, #name, #ops, #outdir, #phylip, #stderr, #stdout

Instance Method Summary collapse

Methods included from TreeCheck

#check_correctAlignment, #check_fulltree

Methods inherited from Raxml

#after_run, #before_run, #run, #salute

Constructor Details

#initialize(opts) ⇒ GammaScorer

Returns a new instance of GammaScorer.



133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/rraxml.rb', line 133

def initialize(opts)
  super(opts)
  check_correctAlignment
  if opts[:starting_newick].nil? or not File.exists?(opts[:starting_newick])
    raise "Scorer requires a starting bunch of trees to score" 
  end
  @starting_newick = opts[:starting_newick]
  check_fulltree # makes sure the tree is comprenhensive in relation to the phylip file
  if opts[:num_threads].nil? 
    @binary = 'raxmlHPC-SSE3'
    @num_threads = 0
  else
    @binary = 'raxmlHPC-PTHREADS-SSE3'
    @num_threads = opts[:num_threads].to_i
  end
end

Instance Method Details

#complete_callObject



149
150
151
152
# File 'lib/rraxml.rb', line 149

def complete_call
  @ops += " -m GTRGAMMA -z #{@starting_newick} -f n"
  @ops += " -T #{@num_threads} " if @num_threads > 0
end

#gather_outfilesObject



153
154
155
# File 'lib/rraxml.rb', line 153

def gather_outfiles
  @outfiles += ["RAxML_result.#{@name}"]
end