{ // handle INPUT_MATRIX and OUTPUT_TREE in each ANALYSIS section
TreeBlock theTreeBlock = null;
for (ValueSection ioSection : an.getIOSections()) {
AnalyzedData theData;
if (ioSection.label.equals("INPUT_MATRIX")) {
AnalyzedMatrix theMatrix = new AnalyzedMatrix();
theMatrix.setInput(true);
String matrixID = ioSection.getsval("matrix_id");
Matrix matrixData = matrices.get(matrixID);
if (matrixData == null) {
warn("Matrix " + matrixID + "is used in analysis " + an.getString("analysis_id") + " but is not listed in any MATRIX section for its study");
return new ValueNone();
}
matrixData.setStudy(theStudy);
ContextManager.getTaxonLabelService().updateStudyForAllLabels(matrixData, theStudy);
matrixData.setTB1MatrixID(matrixID);
ContextManager.getMatrixService().save(matrixData);
theSubmission.addMatrixIfNecessary(matrixData);
ContextManager.getSubmissionService().save(theSubmission);
theMatrix.setMatrix(matrixData);
theData = theMatrix;
} else if (ioSection.label.equals("OUTPUT_TREE")) {
if (theTreeBlock == null) {
theTreeBlock = new TreeBlock();