From a00bc1c75df99d821d6a36342d459dc97b323778 Mon Sep 17 00:00:00 2001 From: Faith Okamoto <52177356+faithokamoto@users.noreply.github.com> Date: Thu, 4 Jun 2026 17:01:11 -0700 Subject: [PATCH 1/3] Report per-aln stats as per-aligned, ignoring unmapped reads --- src/subcommand/stats_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/subcommand/stats_main.cpp b/src/subcommand/stats_main.cpp index 3631c99a35..02912ec99c 100644 --- a/src/subcommand/stats_main.cpp +++ b/src/subcommand/stats_main.cpp @@ -1119,13 +1119,13 @@ int main_stats(int argc, char** argv) { } cout << "Matches: " << combined.total_matched_bases << " bp"; if (combined.total_alignments > 0) { - cout << " (" << combined.total_matched_bases / static_cast(combined.total_alignments) << " bp/alignment)"; + cout << " (" << combined.total_matched_bases / static_cast(combined.total_aligned) << " bp/alignment)"; } cout << endl; cout << "Softclips: " << combined.total_softclipped_bases << " bp"; if (combined.total_alignments > 0) { cout << " (" << 100 * combined.total_softclipped_bases / static_cast(combined.total_bases) << "% of bases, " - << combined.total_softclipped_bases / static_cast(combined.total_alignments) << " bp/alignment)"; + << combined.total_softclipped_bases / static_cast(combined.total_aligned) << " bp/alignment)"; } cout << " in " << combined.total_softclips << " read events" << endl; if(verbose) { From 22127cefa389e073298a6973ca18c4d95d8870e5 Mon Sep 17 00:00:00 2001 From: Faith Okamoto <52177356+faithokamoto@users.noreply.github.com> Date: Fri, 5 Jun 2026 10:16:59 -0700 Subject: [PATCH 2/3] fix denom text --- src/subcommand/stats_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/subcommand/stats_main.cpp b/src/subcommand/stats_main.cpp index 02912ec99c..f766212aea 100644 --- a/src/subcommand/stats_main.cpp +++ b/src/subcommand/stats_main.cpp @@ -1119,13 +1119,13 @@ int main_stats(int argc, char** argv) { } cout << "Matches: " << combined.total_matched_bases << " bp"; if (combined.total_alignments > 0) { - cout << " (" << combined.total_matched_bases / static_cast(combined.total_aligned) << " bp/alignment)"; + cout << " (" << combined.total_matched_bases / static_cast(combined.total_aligned) << " bp/aligned)"; } cout << endl; cout << "Softclips: " << combined.total_softclipped_bases << " bp"; if (combined.total_alignments > 0) { cout << " (" << 100 * combined.total_softclipped_bases / static_cast(combined.total_bases) << "% of bases, " - << combined.total_softclipped_bases / static_cast(combined.total_aligned) << " bp/alignment)"; + << combined.total_softclipped_bases / static_cast(combined.total_aligned) << " bp/aligned)"; } cout << " in " << combined.total_softclips << " read events" << endl; if(verbose) { From 81ba66ed829ee75a43e029145d66256dcd640a52 Mon Sep 17 00:00:00 2001 From: Faith Okamoto <52177356+faithokamoto@users.noreply.github.com> Date: Fri, 5 Jun 2026 13:49:51 -0700 Subject: [PATCH 3/3] update expected output --- test/correct/10_vg_stats/15.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/correct/10_vg_stats/15.txt b/test/correct/10_vg_stats/15.txt index 297f753e1e..aaef9966e6 100644 --- a/test/correct/10_vg_stats/15.txt +++ b/test/correct/10_vg_stats/15.txt @@ -11,8 +11,8 @@ Mapping quality: mean 60, median 60, stdev 0, max 60 (100 reads) Insertions: 0 bp in 0 read events Deletions: 0 bp in 0 read events Substitutions: 0 bp in 0 read events -Matches: 10000 bp (100 bp/alignment) -Softclips: 0 bp (0% of bases, 0 bp/alignment) in 0 read events +Matches: 10000 bp (100 bp/aligned) +Softclips: 0 bp (0% of bases, 0 bp/aligned) in 0 read events Unvisited nodes: 4/208 (4 bp) Single-visited nodes: 11/208 (18 bp) Significantly biased heterozygous sites: 2/62 (3.22581%)