Class: RaxmlLight

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

Instance Attribute Summary collapse

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) ⇒ 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_newickObject (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_callObject



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_outfilesObject



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

#logfilenameObject



121
122
123
# File 'lib/rraxml.rb', line 121

def logfilename
  "RAxML_log.#{@name}"
end

#resultfilenameObject



118
119
120
# File 'lib/rraxml.rb', line 118

def resultfilename
  "RAxML_result.#{@name}"
end