Search in sources :

Example 1 with GatkReportWriter

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");
}
Also used : GATKReport(org.broadinstitute.gatk.utils.report.GATKReport) Category(com.github.lindenb.jvarkit.gatk.Category) GatkReportWriter(com.github.lindenb.jvarkit.gatk.GatkReportWriter) GATKReportTable(org.broadinstitute.gatk.utils.report.GATKReportTable)

Aggregations

Category (com.github.lindenb.jvarkit.gatk.Category)1 GatkReportWriter (com.github.lindenb.jvarkit.gatk.GatkReportWriter)1 GATKReport (org.broadinstitute.gatk.utils.report.GATKReport)1 GATKReportTable (org.broadinstitute.gatk.utils.report.GATKReportTable)1