Skip to content

Commit

Permalink
Issue-250: Improve cluster count precision (#251)
Browse files Browse the repository at this point in the history
* Issue-250: Improve cluster count precision

* Fix version history
  • Loading branch information
ezralanglois authored Jan 29, 2021
1 parent 610da20 commit 58b4e77
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 25 deletions.
3 changes: 1 addition & 2 deletions docs/src/changes.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions interop/logic/summary/tile_summary.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
}
Expand Down
16 changes: 8 additions & 8 deletions interop/model/summary/stat_summary.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ namespace illumina { namespace interop { namespace model { namespace summary
m_percent_gt_q30(std::numeric_limits<float>::quiet_NaN()),
m_yield_g(std::numeric_limits<float>::quiet_NaN()),
m_projected_yield_g(0),
m_reads(std::numeric_limits<float>::quiet_NaN()),
m_reads_pf(std::numeric_limits<float>::quiet_NaN()),
m_reads(0),
m_reads_pf(0),
m_percent_occupied(std::numeric_limits<float>::quiet_NaN())

{
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down Expand Up @@ -311,15 +311,15 @@ 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;
}
/** Set the total number of clusters passing filter in the lane
*
* @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;
}
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/apps/summary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ void summarize(const surface_summary& summary, std::vector<std::string>& 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<float>(summary.reads()), 0, 2, 1e6);
values[i++] = format(static_cast<float>(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++] = "-";
Expand Down Expand Up @@ -303,8 +303,8 @@ void summarize(const lane_summary& summary, std::vector<std::string>& 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<float>(summary.reads()), 0, 2, 1e6);
values[i++] = format(static_cast<float>(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());
Expand Down
12 changes: 6 additions & 6 deletions src/tests/interop/logic/summary_metrics_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/interop/metrics/inc/tile_metrics_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 58b4e77

Please sign in to comment.