ConcretRoot<MCTaxon> root = new ConcretRoot<MCTaxon>(new MCTaxon(sampleTreeRoot.getTaxid(), sampleTreeRoot.getName(), sampleTreeRoot.getRank()) );
List<String> badSequences = new ArrayList();
Map<String, Long> seqCountMap = new HashMap();
for (MCSample sample : samples) {
ClassificationParser parser = ((MCSampleResult) sample).getClassificationParser(classifierFactory);
ClassificationResult result;
while ((result = parser.next()) != null) {
processClassificationResult(result, sample, root, confidence, seqCountMap);
List<RankAssignment> assignList = result.getAssignments();
if ( printRank == null){
printRank = assignList.get(assignList.size() -1).getRank();
}
boolean match = false;
if ( taxonFilter == null){
match = true;
}else {
for ( RankAssignment assign: assignList){
if (taxonFilter.contains(assign.getBestClass().getName()) ){
match = true;
break;
}
}
}
if ( match){
for ( RankAssignment assign: assignList){
if ( assign.getRank().equalsIgnoreCase(printRank) && assign.getConfidence() >= confidence ){
printClassificationResult(result, assign_out, format, confidence);
break;
}
}
}
}
parser.close();
}
return new MultiClassifierResult(root, samples, badSequences, seqCountMap);
}