Module: TreeCheck

Included in:
GammaScorer, Parsimonator, RaxmlGammaSearch, RaxmlLight
Defined in:
lib/rraxml.rb

Instance Method Summary collapse

Instance Method Details

#check_correctAlignmentObject



60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/rraxml.rb', line 60

def check_correctAlignment
  rexec = RaxmlAlignmentChecker.new(:phylip => @phylip)
  rexec.run
  lastline =  File.open(rexec.stdout).readlines.last.chomp.strip
  if lastline != "Alignment format can be read by RAxML"
    raise "File #{@phylip} does not seem to be a correct alignment"
    ret = false
  else
    FileUtils.rm_rf rexec.outdir
    ret = true
  end
end

#check_fulltreeObject



53
54
55
56
57
58
59
# File 'lib/rraxml.rb', line 53

def check_fulltree
  newick_taxa = NewickFile.new(@starting_newick).newickStrings[0].numtaxa
  alignment_taxa = Phylip.new(@phylip).numtaxa
  if alignment_taxa != newick_taxa
    raise "Tree #{@starting_newick} includes #{newick_taxa} taxa, #{alignment_taxa} expected"
  end
end