use of com.github.lindenb.jvarkit.gatk.GatkReportWriter in project jvarkit by lindenb.
the class AbstractGroupBy method onTraversalDone.
@Override
public void onTraversalDone(final Map<Category, Long> counts) {
final GATKReportTable table = createGATKReportTable();
table.addColumn("COUNT");
int nRows = 0;
for (final Category cat : counts.keySet()) {
for (int x = 0; x < cat.size(); ++x) {
table.set(nRows, x, cat.get(x));
}
table.set(nRows, cat.size(), counts.get(cat));
++nRows;
}
final GatkReportWriter reportWriter = GatkReportWriter.createWriter(this.outputTableFormat);
final GATKReport report = new GATKReport();
report.addTable(table);
reportWriter.print(report, this.out);
this.out.flush();
logger.info("TraversalDone");
}
Aggregations