Skip to content

Commit 7667f14

Browse files
committed
added more info to output stats
1 parent 822f169 commit 7667f14

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/trim_paired.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ int paired_main(int argc, char *argv[]) {
117117
int gzip_output = 0;
118118
int combo_all=0;
119119
int combo_s=0;
120+
int total=0;
120121

121122
while (1) {
122123
int option_index = 0;
@@ -375,6 +376,7 @@ int paired_main(int argc, char *argv[]) {
375376

376377
p1cut = sliding_window(fqrec1, qualtype, paired_length_threshold, paired_qual_threshold, no_fiveprime, trunc_n, debug);
377378
p2cut = sliding_window(fqrec2, qualtype, paired_length_threshold, paired_qual_threshold, no_fiveprime, trunc_n, debug);
379+
total += 2;
378380

379381
if (debug) printf("p1cut: %d,%d\n", p1cut->five_prime_cut, p1cut->three_prime_cut);
380382
if (debug) printf("p2cut: %d,%d\n", p2cut->five_prime_cut, p2cut->three_prime_cut);
@@ -478,6 +480,9 @@ int paired_main(int argc, char *argv[]) {
478480
}
479481

480482
if (!quiet) {
483+
if (infn1 && infn2) fprintf(stdout, "\nPE forwrd file: %s\nPE reverse file: %s\n", infn1, infn2);
484+
if (infnc) fprintf(stdout, "\nPE interleaved file: %s\n", infnc);
485+
fprintf(stdout, "\nTotal input FastQ records: %d (%d pairs)\n", total, (total / 2));
481486
fprintf(stdout, "\nFastQ paired records kept: %d (%d pairs)\n", kept_p, (kept_p / 2));
482487
if (pec) fprintf(stdout, "FastQ single records kept: %d\n", (kept_s1 + kept_s2));
483488
else fprintf(stdout, "FastQ single records kept: %d (from PE1: %d, from PE2: %d)\n", (kept_s1 + kept_s2), kept_s1, kept_s2);

src/trim_single.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ int single_main(int argc, char *argv[]) {
7272
int no_fiveprime = 0;
7373
int trunc_n = 0;
7474
int gzip_output = 0;
75+
int total=0;
7576

7677
while (1) {
7778
int option_index = 0;
@@ -192,6 +193,7 @@ int single_main(int argc, char *argv[]) {
192193
while ((l = kseq_read(fqrec)) >= 0) {
193194

194195
p1cut = sliding_window(fqrec, qualtype, single_length_threshold, single_qual_threshold, no_fiveprime, trunc_n, debug);
196+
total++;
195197

196198
if (debug) printf("P1cut: %d,%d\n", p1cut->five_prime_cut, p1cut->three_prime_cut);
197199

@@ -215,7 +217,7 @@ int single_main(int argc, char *argv[]) {
215217
free(p1cut);
216218
}
217219

218-
if (!quiet) fprintf(stdout, "\nFastQ records kept: %d\nFastQ records discarded: %d\n\n", kept, discard);
220+
if (!quiet) fprintf(stdout, "\nSE input file: %s\n\nTotal FastQ records: %d\nFastQ records kept: %d\nFastQ records discarded: %d\n\n", infn, total, kept, discard);
219221

220222
kseq_destroy(fqrec);
221223
gzclose(se);

0 commit comments

Comments
 (0)