diff --git a/docs/src/changes.md b/docs/src/changes.md index 353ed1b52..53a2eed3e 100644 --- a/docs/src/changes.md +++ b/docs/src/changes.md @@ -1,14 +1,13 @@ # Changes {#changes} - ## v1.1.20 Date | Description ---------- | ----------- +2021-01-27 | Issue-250: Improve cluster count precision 2021-01-05 | Fix documentation deployment - ## v1.1.19 Date | Description diff --git a/interop/logic/summary/tile_summary.h b/interop/logic/summary/tile_summary.h index a19350a28..f056f9425 100644 --- a/interop/logic/summary/tile_summary.h +++ b/interop/logic/summary/tile_summary.h @@ -89,14 +89,14 @@ namespace illumina { namespace interop { namespace logic { namespace summary util::op::const_member_function_less(&model::metrics::tile_metric::percent_pf), skip_median); stat_summary.percent_pf(stat); - stat_summary.reads(nan_accumulate(tile_data.begin(), + stat_summary.reads(std::accumulate(tile_data.begin(), tile_data.end(), - float(0), + uint64_t(0), util::op::const_member_function( &model::metrics::tile_metric::cluster_count))); - stat_summary.reads_pf(nan_accumulate(tile_data.begin(), + stat_summary.reads_pf(std::accumulate(tile_data.begin(), tile_data.end(), - float(0), + uint64_t(0), util::op::const_member_function( &model::metrics::tile_metric::cluster_count_pf))); } diff --git a/interop/model/summary/stat_summary.h b/interop/model/summary/stat_summary.h index 55995703f..052e7227a 100644 --- a/interop/model/summary/stat_summary.h +++ b/interop/model/summary/stat_summary.h @@ -35,8 +35,8 @@ namespace illumina { namespace interop { namespace model { namespace summary m_percent_gt_q30(std::numeric_limits::quiet_NaN()), m_yield_g(std::numeric_limits::quiet_NaN()), m_projected_yield_g(0), - m_reads(std::numeric_limits::quiet_NaN()), - m_reads_pf(std::numeric_limits::quiet_NaN()), + m_reads(0), + m_reads_pf(0), m_percent_occupied(std::numeric_limits::quiet_NaN()) { @@ -89,7 +89,7 @@ namespace illumina { namespace interop { namespace model { namespace summary * * @return total number of clusters in the lane */ - float reads() const + uint64_t reads() const { return m_reads; } @@ -98,7 +98,7 @@ namespace illumina { namespace interop { namespace model { namespace summary * * @return total number of clusters passing filter in the lane */ - float reads_pf() const + uint64_t reads_pf() const { return m_reads_pf; } @@ -311,7 +311,7 @@ namespace illumina { namespace interop { namespace model { namespace summary * * @param val total number of clusters in the lane */ - void reads(const float val) + void reads(const uint64_t val) { m_reads = val; } @@ -319,7 +319,7 @@ namespace illumina { namespace interop { namespace model { namespace summary * * @param val total number of clusters passing filter in the lane */ - void reads_pf(const float val) + void reads_pf(const uint64_t val) { m_reads_pf = val; } @@ -487,8 +487,8 @@ namespace illumina { namespace interop { namespace model { namespace summary float m_percent_gt_q30; float m_yield_g; float m_projected_yield_g; - float m_reads; - float m_reads_pf; + uint64_t m_reads; + uint64_t m_reads_pf; private: metric_stat_t m_density; diff --git a/src/apps/summary.cpp b/src/apps/summary.cpp index d52bca11b..90107c1a9 100644 --- a/src/apps/summary.cpp +++ b/src/apps/summary.cpp @@ -272,8 +272,8 @@ void summarize(const surface_summary& summary, std::vector& values, values[i++] = util::format(summary.prephasing_slope().mean(), 3, 3) + " / " + util::format(summary.prephasing_offset().mean(), 3, 3); - values[i++] = format(summary.reads(), 0, 2, 1e6); - values[i++] = format(summary.reads_pf(), 0, 2, 1e6); + values[i++] = format(static_cast(summary.reads()), 0, 2, 1e6); + values[i++] = format(static_cast(summary.reads_pf()), 0, 2, 1e6); values[i++] = format(summary.percent_gt_q30(), 0, 2); values[i++] = format(summary.yield_g(), 0, 2); values[i++] = "-"; @@ -303,8 +303,8 @@ void summarize(const lane_summary& summary, std::vector& values) + util::format(summary.phasing_offset().mean(), 3, 3); values[i++] = util::format(summary.prephasing_slope().mean(), 3, 3) + " / " + util::format(summary.prephasing_offset().mean(), 3, 3); - values[i++] = format(summary.reads(), 0, 2, 1e6); - values[i++] = format(summary.reads_pf(), 0, 2, 1e6); + values[i++] = format(static_cast(summary.reads()), 0, 2, 1e6); + values[i++] = format(static_cast(summary.reads_pf()), 0, 2, 1e6); values[i++] = format(summary.percent_gt_q30(), 0, 2); values[i++] = format(summary.yield_g(), 0, 2); values[i++] = format(summary.cycle_state().error_cycle_range()); diff --git a/src/tests/interop/logic/summary_metrics_test.cpp b/src/tests/interop/logic/summary_metrics_test.cpp index 488b4d7b9..c93bcae1f 100644 --- a/src/tests/interop/logic/summary_metrics_test.cpp +++ b/src/tests/interop/logic/summary_metrics_test.cpp @@ -214,10 +214,10 @@ TEST_P(run_summary_tests, lane_summary) expected_lane_summary.yield_g(), tol); INTEROP_EXPECT_NEAR(actual_lane_summary.projected_yield_g(), expected_lane_summary.projected_yield_g(), tol); - INTEROP_EXPECT_NEAR(actual_lane_summary.reads_pf(), - expected_lane_summary.reads_pf(), tol); - INTEROP_EXPECT_NEAR(actual_lane_summary.reads(), - expected_lane_summary.reads(), tol); + EXPECT_EQ(actual_lane_summary.reads_pf(), + expected_lane_summary.reads_pf()); + EXPECT_EQ(actual_lane_summary.reads(), + expected_lane_summary.reads()); INTEROP_EXPECT_STAT_NEAR(actual_lane_summary.density(), expected_lane_summary.density(), density_tol); INTEROP_EXPECT_STAT_NEAR(actual_lane_summary.density_pf(), expected_lane_summary.density_pf(), @@ -310,8 +310,8 @@ TEST_P(run_summary_tests, surface_summary) INTEROP_EXPECT_NEAR(actual_surface_summary.yield_g(), expected_surface_summary.yield_g(), tol); INTEROP_EXPECT_NEAR(actual_surface_summary.projected_yield_g(), expected_surface_summary.projected_yield_g(), tol); - INTEROP_EXPECT_NEAR(actual_surface_summary.reads_pf(), expected_surface_summary.reads_pf(), tol); - INTEROP_EXPECT_NEAR(actual_surface_summary.reads(), expected_surface_summary.reads(), tol); + EXPECT_EQ(actual_surface_summary.reads_pf(), expected_surface_summary.reads_pf()); + EXPECT_EQ(actual_surface_summary.reads(), expected_surface_summary.reads()); INTEROP_EXPECT_STAT_NEAR(actual_surface_summary.density(), expected_surface_summary.density(), density_tol); diff --git a/src/tests/interop/metrics/inc/tile_metrics_test.h b/src/tests/interop/metrics/inc/tile_metrics_test.h index 8a51dca1d..9148bdc3c 100644 --- a/src/tests/interop/metrics/inc/tile_metrics_test.h +++ b/src/tests/interop/metrics/inc/tile_metrics_test.h @@ -126,7 +126,7 @@ namespace illumina{ namespace interop { namespace unittest // summary[read][0].tile_count(3); summary[read][0].reads_pf(9738715); - summary[read][0].reads(19412848); + summary[read][0].reads(19412847); summary[read][0].density(model::summary::metric_stat(2355119.25f, 0, 2355119.25f)); summary[read][0].density_pf(model::summary::metric_stat(1181477.125f, 27380.955078125f, 1174757.75f)); summary[read][0].cluster_count(model::summary::metric_stat(6470949.5f, 0, 6470949));