theAnalysisStep.setAnalysis(theAnalysis);
theAnalysis.addAnalysisStep(theAnalysisStep);
ContextManager.getAnalysisService().save(theAnalysis);
ContextManager.getAnalysisStepService().save(theAnalysisStep);
Algorithm theAlgorithm;
String tb1Algorithm = an.getString("algorithm");
if (tb1Algorithm.equalsIgnoreCase("parsimony")) {
theAlgorithm = new ParsimonyAlgorithm();
} else if (tb1Algorithm.equalsIgnoreCase("bayesian")) {
theAlgorithm = new BayesianAlgorithm();
} else if (tb1Algorithm.equalsIgnoreCase("evolution")) {
theAlgorithm = new EvolutionAlgorithm();
} else if (tb1Algorithm.equalsIgnoreCase("joining")) {
theAlgorithm = new JoiningAlgorithm();
} else if (tb1Algorithm.equalsIgnoreCase("UPGMA")) {
theAlgorithm = new UPGMAAlgorithm();
} else if (tb1Algorithm.equalsIgnoreCase("likelihood")) {
theAlgorithm = new LikelihoodAlgorithm();
} else {
theAlgorithm = new OtherAlgorithm();
}
theAlgorithm.setDescription(tb1Algorithm);
ContextManager.getAlgorithmHome().save(theAlgorithm);
theAnalysisStep.setAlgorithmInfo(theAlgorithm);
{ // handle INPUT_MATRIX and OUTPUT_TREE in each ANALYSIS section
TreeBlock theTreeBlock = null;