Skip to content

Commit

Permalink
Open log and stats files just before they're written, so we can use t…
Browse files Browse the repository at this point in the history
…hem to test for completion.
  • Loading branch information
brianwalenz committed Sep 18, 2020
1 parent 580e6de commit 52eb6e1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/correction/filterCorrectionLayouts.C
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,6 @@ main(int argc, char **argv) {
readStatus *status = new readStatus [numReads + 1];

FILE *roc = AS_UTL_openOutputFile(outName);
FILE *stats = AS_UTL_openOutputFile(outName, '.', "stats");
FILE *log = AS_UTL_openOutputFile(outName, '.', "log");

// Initialize. Used to be done in analuzeLength(), but we skip it on
// empty tigs, and the re-sort below absolutely needs every readStatus
Expand Down Expand Up @@ -529,7 +527,11 @@ main(int argc, char **argv) {

AS_UTL_closeFile(roc);

// Write some statistics and logs.
// Write some statistics and logs. These are opened just before they're
// written so we can use them for completion tests.

FILE *stats = AS_UTL_openOutputFile(outName, '.', "stats");
FILE *log = AS_UTL_openOutputFile(outName, '.', "log");

dumpStatistics(stats, status, numReads, genomeSize);
dumpLog(log, status, numReads);
Expand Down

0 comments on commit 52eb6e1

Please sign in to comment.