//for each sequence with name, and or true path
List resultList = new ArrayList();
DecisionMaker dm = new DecisionMaker(factory);
HierarchyTree root = factory.getRoot();
HashMap<String, HierarchyTree> genusNodeMap = new HashMap<String, HierarchyTree>();
factory.getRoot().getNodeMap(testRank, genusNodeMap);
if (genusNodeMap.isEmpty()) {
throw new IllegalArgumentException("\nThere is no node in GENUS level!");
}
int i = 0;
Iterator seqIt = seqList.iterator();
while (seqIt.hasNext()) {
LineageSequence pSeq = (LineageSequence) seqIt.next();
GoodWordIterator wordIterator = getPartialSeqIteratorbyWindow(pSeq, window); // full sequence
if (wordIterator == null) {
continue;
}
//for leave-one-out testing, we need to remove the word occurrance for
//the current sequence. This is similiar to hiding a sequence leaf.
HierarchyTree curTree = genusNodeMap.get((String) pSeq.getAncestors().get(pSeq.getAncestors().size() - 1));
curTree.hideSeq(wordIterator);
List result = dm.getBestClasspath( wordIterator, genusNodeMap, false, min_bootstrap_words);
ValidClassificationResultFacade resultFacade = new ValidClassificationResultFacade(pSeq, result);
resultFacade.setLabeledNode(curTree);
compareClassificationResult(resultFacade);
resultList.add(resultFacade);
i++;
// recover the wordOccurrence of the genus node, unhide
curTree.unhideSeq(wordIterator);
}
displayStat();
}