Skip to content

Commit

Permalink
Better logging for Join command
Browse files Browse the repository at this point in the history
  • Loading branch information
kvg committed Jan 25, 2018
1 parent 7759496 commit 05c7019
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions public/java/src/uk/ac/ox/well/cortexjdk/commands/utils/Join.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,24 @@ public void execute() {
cgw.setHeader(cc.getHeader());

log.info("Joining graphs:");
for (int c = 0; c < cc.getNumColors(); c++) {
log.info(" {}: {} ({} kmers)", c, cc.getSampleName(c), cc.getGraph(c).getNumRecords());

long maxRecords = 0;
int ac = 0;
for (CortexGraph g : GRAPHS) {
log.info(" file: {} ({} colors, {} kmers)", g.getFile(), g.getNumColors(), g.getNumRecords());
for (int c = 0; c < g.getNumColors(); c++, ac++) {
log.info(" color {} ({}) -> color {} ({})", c, g.getSampleName(c), ac, cc.getSampleName(ac));
}

if (g.getNumRecords() > maxRecords) {
maxRecords = g.getNumRecords();
}
}

ProgressMeter pm = new ProgressMeterFactory()
.header("Processing graph...")
.message("records processed")
.updateRecord(cc.getGraph(0).getNumRecords() / 10)
.updateRecord(maxRecords / 10)
.make(log);

for (CortexRecord cr : cc) {
Expand Down

0 comments on commit 05c7019

Please sign in to comment.