Class: Parsimonator

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) ⇒ Parsimonator

Returns a new instance of Parsimonator.



76
77
78
79
80
81
82
# File 'lib/rraxml.rb', line 76

def initialize(opts)
  super(opts)
  check_correctAlignment
  @num_trees = opts[:num_trees] || 1
  @newick = opts[:newick] || ""
  @binary = 'parsimonator-SSE3'
end

Instance Attribute Details

#newickObject (readonly)

Returns the value of attribute newick.



75
76
77
# File 'lib/rraxml.rb', line 75

def newick
  @newick
end

#num_treesObject (readonly)

Returns the value of attribute num_trees.



75
76
77
# File 'lib/rraxml.rb', line 75

def num_trees
  @num_trees
end

#seedObject (readonly)

Returns the value of attribute seed.



75
76
77
# File 'lib/rraxml.rb', line 75

def seed
  @seed
end

Instance Method Details

#complete_callObject



83
84
85
86
87
88
89
# File 'lib/rraxml.rb', line 83

def complete_call
  @ops += " -N #{@num_trees} -p #{@seed}"
  unless @newick.empty? then
    raise "No newick starting tree?" unless File.exists?(@newick)
    @ops += " -t #{@newick}"
  end
end

#gather_outfilesObject



90
91
92
# File 'lib/rraxml.rb', line 90

def gather_outfiles
  @num_trees.times{|i| @outfiles <<  "RAxML_parsimonyTree.#{name}.#{i}"}
end