16 namespace illumina{
namespace interop {
namespace unittest
36 const q_val hist1[] = {q_val(6,21208), q_val(19,8227), q_val(32,73051), q_val(37,2339486)};
37 const q_val hist2[] = {q_val(6,22647), q_val(19,9570), q_val(32,81839), q_val(37,2413227)};
38 const q_val hist3[] = {q_val(6,18878), q_val(19,8168), q_val(32,72634), q_val(37,2342292)};
48 template<
class Collection>
51 const signed char tmp[] =
54 ,-50,1,0,80,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
55 ,0,0,0,0,0,0,0,0,0,0,0,-40,82,0,0,0,0,0,0,0
56 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
57 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
58 ,0,0,0,35,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
59 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
60 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,91,29,1,0,0
61 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-98,-78,35,0,0
62 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
63 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
64 ,0,0,0,0,0,0,0,1,0,82,4,1,0,0,0,0,0,0,0,0
65 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,119,88,0
66 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
67 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
68 ,0,0,0,0,0,0,0,0,0,98,37,0,0,0,0,0,0,0,0,0
69 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
70 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
71 ,0,-81,63,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
72 ,0,-85,-46,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
73 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
74 ,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,80,4,2,0,0
75 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
76 ,0,0,0,-66,73,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
77 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
78 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-24,31,0,0,0
79 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
80 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
81 ,0,0,0,0,0,0,0,-70,27,1,0,0,0,0,0,0,0,0,0,0
82 ,0,0,0,0,0,0,0,-108,-67,35,0,0,0,0,0,0,0,0,0,0
83 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
84 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
93 const size_t lane_count = 1;
94 const size_t surface_count = 2;
95 const size_t channel_count = 2;
99 const float q30 = 98.803192138671875f;
101 summary[0][0].tile_count(2);
102 summary[0][0].projected_yield_g(0.0098816361278295517);
103 summary[0][0].yield_g(0.0074112270958721638f);
104 summary[0][0].percent_gt_q30(q30);
105 summary[0][0][0].tile_count(2);
106 summary[0][0][0].projected_yield_g(0.0098816361278295517);
107 summary[0][0][0].yield_g(0.0074112270958721638f);
108 summary[0][0][0].percent_gt_q30(q30);
110 summary[0].summary().projected_yield_g(0.0098816361278295517);
111 summary[0].summary().yield_g(0.0074112270958721638f);
112 summary[0].summary().percent_gt_q30(q30);
138 typedef bin_t::bin_type ushort_t;
140 const uint_t bin_count = 7;
141 ushort_t lower[] = {1, 10, 20, 25, 30, 35, 40};
142 ushort_t upper[] = {9, 19, 24, 29, 34, 39, 41};
143 ushort_t value[] = {1, 14, 22, 27, 33, 37, 40};
144 qscore_bin_vector_type headervec;
145 for(uint_t i=0;i<bin_count;i++)
146 headervec.push_back(bin_t(lower[i], upper[i], value[i]));
151 const q_val hist1[] = {q_val(1,45272), q_val(3,33369), q_val(4,1784241)};
152 const q_val hist2[] = {q_val(1,45229), q_val(3,34304), q_val(4,1792186)};
153 const q_val hist3[] = {q_val(1,49152), q_val(3,37440), q_val(4,1806479)};
163 template<
class Collection>
166 const signed char tmp[] =
169 ,-50,1,7,1,10,20,25,30,35,40,9,19,24,29,34,39,41,1,14,22
170 ,27,33,37,40,1,0,79,4,1,0,0,0,0,0,0,0,0,0,0,0
171 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
172 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
173 ,0,0,-40,-80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
174 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
175 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,-126,0,0,0,0
176 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79,57
177 ,27,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
178 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
179 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
180 ,0,0,0,0,0,0,0,0,0,0,1,0,80,4,1,0,0,0,0,0
181 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
182 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
183 ,0,0,0,0,0,0,0,0,-83,-80,0,0,0,0,0,0,0,0,0,0
184 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
185 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
186 ,0,-122,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
187 ,0,0,0,0,-70,88,27,0,0,0,0,0,0,0,0,0,0,0,0,0
188 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
189 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
190 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,84,4
191 ,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
192 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
193 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-64,0,0,0,0
194 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
195 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
196 ,0,0,0,0,0,0,64,-110,0,0,0,0,0,0,0,0,0,0,0,0
197 ,0,0,0,0,0,0,0,0,0,0,-113,-112,27,0,0,0,0,0,0,0
198 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
199 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
200 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
210 const size_t lane_count = 1;
211 const size_t surface_count = 2;
212 const size_t channel_count = 2;
217 summary[0][0].tile_count(3);
218 summary[0][0].projected_yield_g(0.0056276721879839897f);
219 summary[0][0].yield_g(0.0056276721879839897f);
220 summary[0][0].percent_gt_q30(95.650672912597656f);
221 summary[0][0][0].tile_count(3);
222 summary[0][0][0].projected_yield_g(0.0056276721879839897f);
223 summary[0][0][0].yield_g(0.0056276721879839897f);
224 summary[0][0][0].percent_gt_q30(95.650672912597656f);
226 summary[0].summary().projected_yield_g(0.0056276721879839897f);
227 summary[0].summary().yield_g(0.0056276721879839897f);
228 summary[0].summary().percent_gt_q30(95.650672912597656f);
254 typedef bin_t::bin_type ushort_t;
256 const uint_t bin_count = 7;
258 const ushort_t lower[] = {2, 10, 20, 25, 30, 35, 40};
259 const ushort_t upper[] = {9, 19, 24, 29, 34, 39, 40};
260 const ushort_t value[] = {2, 14, 21, 27, 32, 36, 40};
261 qscore_bin_vector_type headervec;
262 for(uint_t i=0;i<bin_count;i++)
263 headervec.push_back(bin_t(lower[i], upper[i], value[i]));
267 const uint_t hist_all1[] = {0, 267962, 118703, 4284, 2796110, 0, 0};
268 const uint_t hist_all2[] = {0,241483, 44960, 1100, 2899568, 0 ,0};
269 const uint_t hist_all3[] = {0,212144, 53942, 427, 2920598, 0, 0};
279 template<
class Collection>
282 const signed char tmp[] =
284 6,34,1,7,2,10,20,25,30,35,40,9,19,24,29,34,39,40,2,14,21,27,32,36,40
285 ,7,0,90,4,1,0,0,0,0,0,-70,22,4,0,-81,-49,1,0,-68,16,0,0,78,-86,42,0,0,0,0,0,0,0,0,0
286 ,7,0,90,4,2,0,0,0,0,0,75,-81,3,0,-96,-81,0,0,76,4,0,0,112,62,44,0,0,0,0,0,0,0,0,0
287 ,7,0,90,4,3,0,0,0,0,0,-80,60,3,0,-74,-46,0,0,-85,1,0,0,-106,-112,44,0,0,0,0,0,0,0,0,0
296 const size_t lane_count = 1;
297 const size_t surface_count = 2;
298 const size_t channel_count = 2;
303 summary[0][0].lane(7);
304 summary[0][0].tile_count(1);
305 summary[0][0].projected_yield_g(0.0095612816512584686f);
306 summary[0][0].yield_g(0.009561280719935894f);
307 summary[0][0].percent_gt_q30(90.1163330078125f);
308 summary[0][0][0].tile_count(1);
309 summary[0][0][0].projected_yield_g(0.0095612816512584686f);
310 summary[0][0][0].yield_g(0.009561280719935894f);
311 summary[0][0][0].percent_gt_q30(90.1163330078125f);
313 summary[0].summary().projected_yield_g(0.0095612816512584686f);
314 summary[0].summary().yield_g(0.0095612816512584686f);
315 summary[0].summary().percent_gt_q30(90.1163330078125f);
351 template<
class Collection>
354 const signed char tmp[] =
356 6,-50,0,1,0,86,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
357 ,0,0,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0,0,0,0
375 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
376 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
377 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
378 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
493 const ::uint32_t kValue1 =
static_cast< ::uint32_t
>(1e7);
494 const ::uint32_t kValue2 =
static_cast< ::uint32_t
>(2e7);
496 const ::uint32_t hist[] = {kValue2, kValue2, kValue1, 0, kValue1, kValue2, kValue2};
498 const ::uint32_t hist_last_cycle_of_read[] = {kValue2, kValue2, kValue2, kValue1, kValue1, kValue1, kValue1};
499 for(
size_t cycle=1;cycle<=run_info.
total_cycles();++cycle)
520 const size_t tile_count = 2;
521 const size_t lane_count = 1;
522 const size_t lane_number = 1;
523 const size_t surface_count = 2;
524 const size_t channel_count = 2;
525 const size_t cycles_per_read = 6;
526 const float kExpectedPercentGreaterThanOrEqualToQ30 = 50.0f;
527 const float kExpectedReadYield = 1.0f;
535 const size_t total_cycles = cycles_per_read*read_count;
538 for(
size_t read_index=0;read_index < read_count;++read_index)
540 summary[read_index][0].lane(lane_number);
541 summary[read_index][0].tile_count(tile_count);
542 summary[read_index][0][0].tile_count(tile_count);
546 summary[read_index].summary().percent_gt_q30(kExpectedPercentGreaterThanOrEqualToQ30);
547 summary[read_index][0].percent_gt_q30(kExpectedPercentGreaterThanOrEqualToQ30);
548 summary[read_index][0][0].percent_gt_q30(kExpectedPercentGreaterThanOrEqualToQ30);
549 summary[read_index][0].yield_g(kExpectedReadYield);
550 summary[read_index][0][0].yield_g(kExpectedReadYield);
551 summary[read_index].summary().yield_g(kExpectedReadYield);
552 summary[read_index].summary().projected_yield_g(kExpectedReadYield);
555 summary[read_index][0].projected_yield_g(kExpectedReadYield);
556 summary[read_index][0][0].projected_yield_g(kExpectedReadYield);
587 typedef bin_t::bin_type ushort_t;
589 const uint_t bin_count = 7;
591 const ushort_t lower[] = {2, 10, 20, 25, 30, 35, 40};
592 const ushort_t upper[] = {9, 19, 24, 29, 34, 39, 40};
593 const ushort_t value[] = {2, 14, 21, 27, 32, 36, 40};
594 qscore_bin_vector_type headervec;
595 for(uint_t i=0;i<bin_count;i++)
596 headervec.push_back(bin_t(lower[i], upper[i], value[i]));
600 const uint_t hist_all1[] = {0, 267962, 118703, 4284, 2796110, 0, 0};
601 const uint_t hist_all2[] = {0,241483, 44960, 1100, 2899568, 0 ,0};
602 const uint_t hist_all3[] = {0,212144, 53942, 427, 2920598, 0, 0};
612 template<
class Collection>
615 const signed char tmp[] =
617 7,36,1,7,2,9,2,10,19,14,20,24,21,25,29,27,30,34,32,35,39,36
618 ,40,40,40,7,0,-90,-79,1,0,1,0,0,0,0,0,-70,22,4,0,-81,-49,1
619 ,0,-68,16,0,0,78,-86,42,0,0,0,0,0,0,0,0,0,7,0,-90,-79,1,0
620 ,2,0,0,0,0,0,75,-81,3,0,-96,-81,0,0,76,4,0,0,112,62,44,0,0
621 ,0,0,0,0,0,0,0,7,0,-90,-79,1,0,3,0,0,0,0,0,-80,60,3,0,-74
622 ,-46,0,0,-85,1,0,0,-106,-112,44,0,0,0,0,0,0,0,0,0
static void create_summary(model::summary::run_summary &summary)
Definition: q_metrics_test.h:518
const metric_summary & total_summary() const
Definition: run_summary.h:314
void insert(const metric_type &metric)
Definition: metric_set.h:267
Definition: q_metrics_test.h:330
static void create_expected(metric_set_t &metrics, const model::run::info &=model::run::info())
Definition: q_metrics_test.h:134
Definition: metric_set.h:40
float percent_gt_q30() const
Definition: metric_summary.h:78
Definition: enum_description.h:15
const run::cycle_range & qscored_cycle_range() const
Definition: cycle_state_summary.h:59
void initialize(const run::info &run_info)
Definition: run_summary.h:99
Definition: q_metric.h:261
float projected_yield_g() const
Definition: metric_summary.h:99
Definition: q_metrics_test.h:128
bool is_last_cycle_of_read(const size_t cycle) const
Definition: info.h:268
static void create_binary_data(Collection &buffer)
Definition: q_metrics_test.h:613
static std::vector< T > to_vector(const T(&vals)[N])
Definition: metric_test.h:85
static void create_expected(metric_set_t &metrics, const model::run::info &=model::run::info())
Definition: q_metrics_test.h:583
Definition: cycle_range.h:20
model::metrics::q_metric metric_t
Definition: metric_test.h:57
static void create_summary(model::summary::run_summary &summary)
Definition: q_metrics_test.h:91
q_score_header header_type
Definition: q_metric.h:264
Definition: read_info.h:20
Definition: metric_test.h:41
static void create_expected(metric_set_t &metrics, const model::run::info &=model::run::info())
Definition: q_metrics_test.h:336
model::metric_base::metric_set< model::metrics::q_metric > metric_set_t
Definition: metric_test.h:59
static void create_binary_data(Collection &buffer)
Definition: q_metrics_test.h:164
Definition: metric_test.h:47
Definition: q_metrics_test.h:244
static void create_expected(metric_set_t &metrics, const model::run::info &run_info)
Definition: q_metrics_test.h:478
::uint32_t uint_t
Definition: base_metric.h:77
static void create_summary(model::summary::run_summary &summary)
Definition: q_metrics_test.h:294
def summary(run_metrics, level='Total', columns=None, dtype='f4', ignore_missing_columns=True, extra)
Definition: core.py:217
const cycle_state_summary & cycle_state() const
Definition: run_summary.h:370
Definition: q_metrics_test.h:471
Definition: q_metric.h:247
Definition: metric_test.h:22
size_t total_cycles() const
Definition: info.h:334
static void create_binary_data(Collection &buffer)
Definition: q_metrics_test.h:280
Definition: q_metrics_test.h:577
static void create_expected(metric_set_t &metrics, const model::run::info &=model::run::info())
Definition: q_metrics_test.h:30
Definition: q_metric.h:30
Definition: run_summary.h:23
static void create_summary(model::summary::run_summary &summary)
Definition: q_metrics_test.h:208
static void create_binary_data(Collection &buffer)
Definition: q_metrics_test.h:352
float yield_g() const
Definition: metric_summary.h:88
static void create_binary_data(Collection &buffer)
Definition: q_metrics_test.h:49
static void create_expected(metric_set_t &metrics, const model::run::info &=model::run::info())
Definition: q_metrics_test.h:250
metric_t::header_type header_t
Definition: metric_test.h:61
size_t length_of(const T &val)
Definition: length_of.h:55
const metric_summary & nonindex_summary() const
Definition: run_summary.h:342
Definition: q_metrics_test.h:24