From: Daniel Jones Date: Tue, 22 Nov 2011 22:50:32 +0000 (-0800) Subject: Add the offset, not subtract. X-Git-Url: https://git.donarmstrong.com/?p=fastq-tools.git;a=commitdiff_plain;h=29c57c81e12aaa9a7a5b5fe2f6e3864c6ada81d3 Add the offset, not subtract. --- diff --git a/src/fastq-qualadj.c b/src/fastq-qualadj.c index 2bfa31f..488fdad 100644 --- a/src/fastq-qualadj.c +++ b/src/fastq-qualadj.c @@ -51,7 +51,7 @@ void fastq_qualadj(FILE* fin, FILE* fout, int offset) while (fastq_next(fqf, seq)) { for (i = 0; i < seq->qual.n; ++i) { - c = (int) seq->qual.s[i] - offset; + c = (int) seq->qual.s[i] + offset; c = c < 0 ? 0 : (c > 126 ? 126: c); seq->qual.s[i] = (char) c; }