final EvaluationContext nec = stratManager.get(key);
for ( final VariantEvaluator ve : nec.getVariantEvaluators() ) {
final GATKReportTable table = report.getTable(ve.getSimpleName());
final AnalysisModuleScanner scanner = new AnalysisModuleScanner(ve);
final Map<Field, DataPoint> datamap = scanner.getData();
try {
if ( scanner.hasMoltenField() ) {
final Field field = scanner.getMoltenField();
final Object fieldValue = field.get(ve);
if ( fieldValue == null || ! (fieldValue instanceof Map) )
throw new ReviewedGATKException("BUG field " + field.getName() + " must be a non-null instance of Map in " + scanner.getAnalysis().name());
final Map<Object, Object> map = (Map<Object, Object>)fieldValue;
if ( map.isEmpty() )
throw new ReviewedGATKException("BUG: map is null or empty in analysis " + scanner.getAnalysis());
int counter = 0; // counter is used to ensure printing order is as defined by entrySet
for ( Map.Entry<Object, Object> keyValue : map.entrySet() ) {
// "%05d" is a terrible hack to ensure sort order
final String moltenStratStateString = stratStateString + String.format("%05d", counter++);
setStratificationColumns(table, moltenStratStateString, stratsAndStates);
table.set(moltenStratStateString, scanner.getMoltenAnnotation().variableName(), keyValue.getKey());
table.set(moltenStratStateString, scanner.getMoltenAnnotation().valueName(), keyValue.getValue());
}
} else {
setStratificationColumns(table, stratStateString, stratsAndStates);
for ( final Field field : datamap.keySet()) {
table.set(stratStateString, field.getName(), field.get(ve));