Class: RaxmlLight
Instance Attribute Summary collapse
-
#starting_newick ⇒ Object
readonly
Returns the value of attribute starting_newick.
Attributes inherited from Raxml
#binary, #infofile, #name, #ops, #outdir, #phylip, #stderr, #stdout
Instance Method Summary collapse
- #complete_call ⇒ Object
- #gather_outfiles ⇒ Object
-
#initialize(opts) ⇒ RaxmlLight
constructor
A new instance of RaxmlLight.
- #logfilename ⇒ Object
- #resultfilename ⇒ Object
Methods included from TreeCheck
#check_correctAlignment, #check_fulltree
Methods inherited from Raxml
#after_run, #before_run, #run, #salute
Constructor Details
#initialize(opts) ⇒ RaxmlLight
Returns a new instance of RaxmlLight.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/rraxml.rb', line 97 def initialize(opts) super(opts) check_correctAlignment if opts[:starting_newick].nil? or not File.exists?(opts[:starting_newick]) raise "Raxml Light requires a starting tree" end @starting_newick = opts[:starting_newick] check_fulltree # makes sure the tree is comprenhensive in relation to the phylip file #@name = @starting_newick.split(".").last if opts[:num_threads].nil? @binary = 'raxmlLight' @num_threads = 0 else @binary = 'raxmlLight-PTHREADS' @num_threads = opts[:num_threads].to_i end end |
Instance Attribute Details
#starting_newick ⇒ Object (readonly)
Returns the value of attribute starting_newick.
96 97 98 |
# File 'lib/rraxml.rb', line 96 def starting_newick @starting_newick end |
Instance Method Details
#complete_call ⇒ Object
114 115 116 117 |
# File 'lib/rraxml.rb', line 114 def complete_call @ops += " -m GTRCAT -t #{@starting_newick} " @ops += " -T #{@num_threads} " if @num_threads > 0 end |
#gather_outfiles ⇒ Object
124 125 126 127 128 |
# File 'lib/rraxml.rb', line 124 def gather_outfiles @outfiles += [self.resultfilename, self.logfilename] Dir.entries(Dir.pwd).select{|f| f=~ /^RAxML_binaryCheckpoint.#{@name}_/}.each{ |f| @outfiles << f} @outfiles end |
#logfilename ⇒ Object
121 122 123 |
# File 'lib/rraxml.rb', line 121 def logfilename "RAxML_log.#{@name}" end |
#resultfilename ⇒ Object
118 119 120 |
# File 'lib/rraxml.rb', line 118 def resultfilename "RAxML_result.#{@name}" end |