From 928c419966900bc768e2f5d8541b6f02636ddfa4 Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Fri, 20 Mar 2026 16:40:39 -0700 Subject: [PATCH 1/3] src/Module.hpp: silencing a compiler warning for unused arg --- src/Module.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Module.hpp b/src/Module.hpp index 511edd1..331d50e 100644 --- a/src/Module.hpp +++ b/src/Module.hpp @@ -159,7 +159,7 @@ class ModulePerBaseSequenceQuality : public Module { void write_module(std::ostream &os); void - read_data_line(const std::string &line); + read_data_line([[maybe_unused]] const std::string &line); std::string make_html_data(); }; From 75b5a26ad5553dde122f1a31111f5f7f249acf92 Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Fri, 20 Mar 2026 16:41:18 -0700 Subject: [PATCH 2/3] src/Module.cpp: fixing a bug when calculating the maximum difference at any position for the per base sequence content --- src/Module.cpp | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/src/Module.cpp b/src/Module.cpp index bb3986f..c7223c9 100644 --- a/src/Module.cpp +++ b/src/Module.cpp @@ -772,7 +772,8 @@ ModulePerBaseSequenceQuality::make_html_data() { } void -ModulePerBaseSequenceQuality::read_data_line(const std::string &line) {} +ModulePerBaseSequenceQuality::read_data_line( + [[maybe_unused]] const std::string &line) {} /************** PER TILE SEQUENCE QUALITY ********************/ const std::string ModulePerTileSequenceQuality::module_name = @@ -1116,28 +1117,15 @@ ModulePerBaseSequenceContent::summarize_module(FastqStats &stats) { t_pos = 100.0 * t_pos / std::max(std::numeric_limits::min(), total_pos); - // for WGBS, we only test non-bisulfite treated bases - if (!is_reverse_complement) - max_diff = std::max(max_diff, std::fabs(a_pos - g_pos)); - else - max_diff = std::max(max_diff, std::fabs(c_pos - t_pos)); - - if (!is_bisulfite) { - max_diff = std::max(max_diff, std::fabs(a_pos - c_pos)); - max_diff = std::max(max_diff, std::fabs(a_pos - t_pos)); - max_diff = std::max(max_diff, std::fabs(c_pos - g_pos)); - max_diff = std::max(max_diff, std::fabs(t_pos - g_pos)); - - if (!is_reverse_complement) - max_diff = std::max(max_diff, std::fabs(c_pos - t_pos)); - else - max_diff = std::max(max_diff, std::fabs(a_pos - g_pos)); - } - // WGBS specific base content count - else { + if (is_bisulfite) { + // for WGBS, we only test non-bisulfite treated bases max_diff = - std::max(max_diff, std::fabs((c_pos + t_pos) - (a_pos + g_pos))); + std::max(max_diff, is_reverse_complement ? std::fabs(c_pos - t_pos) + : std::fabs(a_pos - g_pos)); + continue; } + max_diff = std::max( + max_diff, std::max(std::fabs(a_pos - t_pos), std::fabs(c_pos - g_pos))); } // turns above values to percent From 37a012cf3f1253520598c203d632b491995c4016 Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Fri, 20 Mar 2026 16:41:58 -0700 Subject: [PATCH 3/3] test/md5sum.txt: updating test output file hashes for bugfix in calculating the max difference for per base sequence content --- test/md5sum.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/md5sum.txt b/test/md5sum.txt index cc38a41..faac2a1 100644 --- a/test/md5sum.txt +++ b/test/md5sum.txt @@ -2,8 +2,6 @@ fe1d421b95e1289f62d5f60157b8bed0 test_output/SRR1853178_1/fastqc_data.txt 36df1dcab539ba4ef885239fc8524636 test_output/SRR1853178_1/summary.txt 19c984bdddd5d656e8bb9f50bb08fc5a test_output/SRR3897196_2/fastqc_data.txt 80cd130958bcb2219f1e5a07d06a3b6e test_output/SRR3897196_2/summary.txt -eafecdffa8aa5357c70e3df61704d5c8 test_output/SRR9624732_1/fastqc_data.txt -a525d455b17eb6ba84cd2a60d281a2b0 test_output/SRR9624732_1/summary.txt 9bb60254ebbca76328a0fc5c7d35d38f test_output/SRR10143153_2/fastqc_data.txt 19f1811f324e4c44154f659bb6e22806 test_output/SRR10143153_2/summary.txt b5b45d94670c42ddff565d53ff9b34e8 test_output/SRR1772703.lite.1/fastqc_data.txt @@ -28,3 +26,5 @@ b736ee95d5c450ef5c0dda31957b6818 test_output/SRR3897196_1/summary.txt 9ad191925d47a57d4f8b12f21ba0a7c3 test_output/SRR10143153_1/summary.txt 255171890adc7117a5c4fae6d355091e test_output/SRR1853178_2/fastqc_data.txt c331d0f7a6aa9d72be41ac531f9ba269 test_output/SRR1853178_2/summary.txt +c94f94bdfbed9b83f156c15ffea84127 test_output/SRR9624732_1/summary.txt +b433a0d30f3952f2f5f94cd90ecc6939 test_output/SRR9624732_1/fastqc_data.txt