Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 9 additions & 21 deletions src/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -1116,28 +1117,15 @@ ModulePerBaseSequenceContent::summarize_module(FastqStats &stats) {
t_pos =
100.0 * t_pos / std::max(std::numeric_limits<double>::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
Expand Down
2 changes: 1 addition & 1 deletion src/Module.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
};
Expand Down
4 changes: 2 additions & 2 deletions test/md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Loading