info_test.h
Go to the documentation of this file.
1 
9 #pragma once
10 #include "interop/util/length_of.h"
11 #include "interop/model/run/info.h"
12 
13 
14 namespace illumina{ namespace interop { namespace unittest
15 {
19  {
24  static void create_string(std::string& data)
25  {
26  data= "<?xml version=\"1.0\"?>\n"
27  "<RunInfo xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" Version=\"2\">\n"
28  " <Run Id=\"120705_M00903_0009_A000000000-A12V4\" Number=\"8\">\n"
29  " <Flowcell>000000000-A12V4</Flowcell>\n"
30  " <Instrument>M00903</Instrument>\n"
31  " <Date>120705</Date>\n"
32  " <Reads>\n"
33  " <Read NumCycles=\"251\" Number=\"1\" IsIndexedRead=\"N\" />\n"
34  " <Read NumCycles=\"12\" Number=\"2\" IsIndexedRead=\"Y\" />\n"
35  " <Read NumCycles=\"251\" Number=\"3\" IsIndexedRead=\"N\" />\n"
36  " </Reads>\n"
37  " <FlowcellLayout LaneCount=\"1\" SurfaceCount=\"2\" SwathCount=\"1\" TileCount=\"14\" />\n"
38  " </Run>\n"
39  "</RunInfo>";
40  }
46  static void create_expected(model::run::info& expected_run_info, const std::vector<model::run::read_info>& reads)
47  {
48  expected_run_info = model::run::info("120705_M00903_0009_A000000000-A12V4" /* run id */,
49  "120705" /* date */ ,
50  "M00903" /* instrument name*/,
51  8 /* run number */,
52  2 ,
53  model::run::flowcell_layout(1 /*lane count*/,
54  2 /*surface count*/,
55  1 /*swath count */,
56  14 /*tile count */,
57  1 /* sections per lane */,
58  1 /* lanes per section*/,
59  std::vector<std::string> () /* Tiles */,
61  "000000000-A12V4" /* flowcell id */),
62  std::vector<std::string>() /*Image channels */,
63  model::run::image_dimensions(/*Width*/ 0, /*Height*/ 0),
64  reads);
65  }
70  static void create_expected(model::run::info& expected_run_info)
71  {
72  const model::run::read_info reads[] = {
73  /*Number, IsIndexedRead, CycleStart, CycleEnd*/
74  model::run::read_info(1, 1, 251, false),
75  model::run::read_info(2, 252, 263, true),
76  model::run::read_info(3, 264, 514, false)
77  };
78  create_expected(expected_run_info, util::to_vector(reads));
79  }
80  };
81 
82 
86  {
91  static void create_string(std::string& data)
92  {
93  data= "<?xml version=\"1.0\"?>\n"
94  "<RunInfo xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" Version=\"2\">\n"
95  " <Run Id=\"151014_D00154_0539_AHCTK2BCXX_HiSeq 2500_TruSeq Exome_12 replicates of NA12878\" Number=\"539\">\n"
96  " <Flowcell>HCTK2BCXX</Flowcell>\n"
97  " <Instrument>D00154</Instrument>\n"
98  " <Date>151014</Date>\n"
99  " <Reads>\n"
100  " <Read Number=\"1\" NumCycles=\"76\" IsIndexedRead=\"N\" />\n"
101  " <Read Number=\"2\" NumCycles=\"8\" IsIndexedRead=\"Y\" />\n"
102  " <Read Number=\"3\" NumCycles=\"76\" IsIndexedRead=\"N\" />\n"
103  " </Reads>\n"
104  " <FlowcellLayout LaneCount=\"2\" SurfaceCount=\"2\" SwathCount=\"2\" TileCount=\"16\" />\n"
105  " <AlignToPhiX>\n"
106  " <Lane>1</Lane>\n"
107  " <Lane>2</Lane>\n"
108  " </AlignToPhiX>\n"
109  " </Run>\n"
110  "</RunInfo>";
111  }
117  static void create_expected(model::run::info& expected_run_info, const std::vector<model::run::read_info>& reads)
118  {
119  expected_run_info = model::run::info("151014_D00154_0539_AHCTK2BCXX_HiSeq 2500_TruSeq Exome_12 replicates of NA12878" /* run id */,
120  "151014" /* date */ ,
121  "D00154" /* instrument name*/,
122  539 /* run number */,
123  2 ,
124  model::run::flowcell_layout(2 /*lane count*/,
125  2 /*surface count*/,
126  2 /*swath count */,
127  16 /*tile count */,
128  1 /* sections per lane */,
129  1 /* lanes per section*/,
130  std::vector<std::string>() /* Tiles */,
132  "HCTK2BCXX" /* flowcell id */),
133  std::vector<std::string>() /*Image channels */,
134  model::run::image_dimensions(/*Width*/ 0, /*Height*/ 0),
135  reads);
136  }
141  static void create_expected(model::run::info& expected_run_info)
142  {
143  const model::run::read_info reads[] = {
144  /*Number, IsIndexedRead, CycleStart, CycleEnd*/
145  model::run::read_info(1, 1, 76, false),
146  model::run::read_info(2, 77, 84, true),
147  model::run::read_info(3, 85, 160, false)
148  };
149  create_expected(expected_run_info, util::to_vector(reads));
150  }
151  };
152 
156  {
161  static void create_string(std::string& data)
162  {
163  data= "<?xml version=\"1.0\"?>\n"
164  "<RunInfo xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" Version=\"3\">\n"
165  " <Run Id=\"160223_196_2371_AH7MF5BBXX\" Number=\"2371\">\n"
166  " <Flowcell>H7MF5BBXX</Flowcell>\n"
167  " <Instrument>196</Instrument>\n"
168  " <Date>160223</Date>\n"
169  " <Reads>\n"
170  " <Read Number=\"1\" NumCycles=\"151\" IsIndexedRead=\"N\" />\n"
171  " <Read Number=\"2\" NumCycles=\"151\" IsIndexedRead=\"N\" />\n"
172  " </Reads>\n"
173  " <FlowcellLayout LaneCount=\"8\" SurfaceCount=\"2\" SwathCount=\"2\" TileCount=\"28\">\n"
174  " <TileSet TileNamingConvention=\"FourDigit\">\n"
175  " <Tiles>\n"
176  " <Tile>1_1101</Tile>\n"
177  " <Tile>1_1102</Tile>\n"
178  " </Tiles>\n"
179  " </TileSet>\n"
180  " </FlowcellLayout>\n"
181  " <AlignToPhiX />\n"
182  " <ImageDimensions Width=\"3188\" Height=\"4826\" />\n"
183  " <ImageChannels>\n"
184  " <Name>A</Name>\n"
185  " <Name>G</Name>\n"
186  " <Name>T</Name>\n"
187  " <Name>C</Name>\n"
188  " </ImageChannels>\n"
189  " </Run>\n"
190  "</RunInfo>";
191  }
197  static void create_expected(model::run::info& expected_run_info, const std::vector<model::run::read_info>& reads)
198  {
199  std::string tiles[] = {
200  "1_1101",
201  "1_1102"
202  };
203  const std::string channels[] = {"A", "G", "T", "C"};
204  expected_run_info = model::run::info("160223_196_2371_AH7MF5BBXX" /* run id */,
205  "160223" /* date */ ,
206  "196" /* instrument name*/,
207  2371 /* run number */,
208  3 ,
209  model::run::flowcell_layout(8 /*lane count*/,
210  2 /*surface count*/,
211  2 /*swath count */,
212  28 /*tile count */,
213  1 /* sections per lane */,
214  1 /* lanes per section*/,
215  util::to_vector(tiles) /* Tiles */,
217  "H7MF5BBXX" /* flowcell id */),
218  util::to_vector(channels) /*Image channels */,
219  model::run::image_dimensions(/*Width*/ 3188, /*Height*/ 4826),
220  reads);
221  }
226  static void create_expected(model::run::info& expected_run_info)
227  {
228  const model::run::read_info reads[] = {
229  /*Number, IsIndexedRead, CycleStart, CycleEnd*/
230  model::run::read_info(1, 1, 151, false),
231  model::run::read_info(2, 152, 302, false)
232  };
233  create_expected(expected_run_info, util::to_vector(reads));
234  }
235  };
236 
240  {
245  static void create_string(std::string& data)
246  {
247  data= "<?xml version=\"1.0\"?>\n"
248  "<RunInfo xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" Version=\"4\">\n"
249  " <Run Id=\"160822_ML-P2-01_0042_A000H02MNK\" Number=\"42\">\n"
250  " <Flowcell>000H02MNK</Flowcell>\n"
251  " <Instrument>ML-P2-01</Instrument>\n"
252  " <Date>160822</Date>\n"
253  " <Reads>\n"
254  " <Read Number=\"1\" NumCycles=\"150\" IsIndexedRead=\"N\" />\n"
255  " <Read Number=\"2\" NumCycles=\"8\" IsIndexedRead=\"Y\" />\n"
256  " <Read Number=\"3\" NumCycles=\"8\" IsIndexedRead=\"Y\" />\n"
257  " <Read Number=\"4\" NumCycles=\"150\" IsIndexedRead=\"N\" />\n"
258  " </Reads>\n"
259  " <FlowcellLayout LaneCount=\"1\" SurfaceCount=\"2\" SwathCount=\"3\" TileCount=\"10\" SectionPerLane=\"1\" LanePerSection=\"1\">\n"
260  " <TileSet TileNamingConvention=\"FiveDigit\">\n"
261  " <Tiles>\n"
262  " <Tile>1_11102</Tile>\n"
263  " <Tile>1_21102</Tile>\n"
264  " </Tiles>\n"
265  " </TileSet>\n"
266  " </FlowcellLayout>\n"
267  " <ImageDimensions Width=\"2592\" Height=\"1944\" />\n"
268  " <ImageChannels>\n"
269  " <Name>Red</Name>\n"
270  " <Name>Green</Name>\n"
271  " </ImageChannels>\n"
272  " </Run>\n"
273  "</RunInfo>";
274  }
280  static void create_expected(model::run::info& expected_run_info, const std::vector<model::run::read_info>& reads)
281  {
282  std::string tiles[] = {
283  "1_11102",
284  "1_21102"
285  };
286  const std::string channels[] = {"Red", "Green"};
287  expected_run_info = model::run::info("160822_ML-P2-01_0042_A000H02MNK" /* run id */,
288  "160822" /* date */ ,
289  "ML-P2-01" /* instrument name*/,
290  42 /* run number */,
291  4 ,
292  model::run::flowcell_layout(1 /*lane count*/,
293  2 /*surface count*/,
294  3 /*swath count */,
295  10 /*tile count */,
296  1 /* sections per lane */,
297  1 /* lanes per section*/,
298  util::to_vector(tiles) /* Tiles */,
300  "000H02MNK" /* flowcell id */),
301  util::to_vector(channels) /*Image channels */,
302  model::run::image_dimensions(/*Width*/ 2592, /*Height*/ 1944),
303  reads);
304  }
309  static void create_expected(model::run::info& expected_run_info)
310  {
311  const model::run::read_info reads[] = {
312  /*Number, IsIndexedRead, CycleStart, CycleEnd*/
313  model::run::read_info(1, 1, 150, false),
314  model::run::read_info(2, 151, 158, true),
315  model::run::read_info(3, 159, 166, true),
316  model::run::read_info(4, 167, 316, false)
317  };
318  create_expected(expected_run_info, util::to_vector(reads));
319  }
320  };
321 
322 
326  {
331  static void create_string(std::string& data)
332  {
333  data= "<?xml version=\"1.0\"?>\n"
334  "<RunInfo xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" Version=\"4\">\n"
335  " <Run Id=\"160630_NS500179_0099_AHW3YTBGXX\" Number=\"99\">\n"
336  " <Flowcell>HW3YTBGXX</Flowcell>\n"
337  " <Instrument>NS500179</Instrument>\n"
338  " <Date>160630</Date>\n"
339  " <Reads>\n"
340  " <Read Number=\"1\" NumCycles=\"101\" IsIndexedRead=\"N\" />\n"
341  " <Read Number=\"2\" NumCycles=\"6\" IsIndexedRead=\"Y\" />\n"
342  " <Read Number=\"3\" NumCycles=\"101\" IsIndexedRead=\"N\" />\n"
343  " </Reads>\n"
344  " <FlowcellLayout LaneCount=\"4\" SurfaceCount=\"2\" SwathCount=\"3\" TileCount=\"12\" SectionPerLane=\"3\" LanePerSection=\"2\">\n"
345  " <TileSet TileNamingConvention=\"FiveDigit\">\n"
346  " <Tiles>\n"
347  " <Tile>1_11101</Tile>\n"
348  " <Tile>1_21101</Tile>\n"
349  " </Tiles>\n"
350  " </TileSet>\n"
351  " </FlowcellLayout>\n"
352  " <ImageDimensions Width=\"2592\" Height=\"1944\" />\n"
353  " <ImageChannels>\n"
354  " <Name>Red</Name>\n"
355  " <Name>Green</Name>\n"
356  " </ImageChannels>\n"
357  " </Run>\n"
358  "</RunInfo>";
359  }
365  static void create_expected(model::run::info& expected_run_info, const std::vector<model::run::read_info>& reads)
366  {
367  std::string tiles[] = {
368  "1_11101",
369  "1_21101"
370  };
371  const std::string channels[] = {"Red", "Green"};
372  expected_run_info = model::run::info("160630_NS500179_0099_AHW3YTBGXX" /* run id */,
373  "160630" /* date */ ,
374  "NS500179" /* instrument name*/,
375  99 /* run number */,
376  4 ,
377  model::run::flowcell_layout(4 /*lane count*/,
378  2 /*surface count*/,
379  3 /*swath count */,
380  12 /*tile count */,
381  3 /* sections per lane */,
382  2 /* lanes per section*/,
383  util::to_vector(tiles) /* Tiles */,
385  "HW3YTBGXX" /* flowcell id */),
386  util::to_vector(channels) /*Image channels */,
387  model::run::image_dimensions(/*Width*/ 2592, /*Height*/ 1944),
388  reads);
389  }
394  static void create_expected(model::run::info& expected_run_info)
395  {
396  const model::run::read_info reads[] = {
397  /*Number, IsIndexedRead, CycleStart, CycleEnd*/
398  model::run::read_info(1, 1, 101, false),
399  model::run::read_info(2, 102, 107, true),
400  model::run::read_info(3, 108, 208, false)
401  };
402  create_expected(expected_run_info, util::to_vector(reads));
403  }
404  };
405 
406 
410  {
415  static void create_string(std::string& data)
416  {
417  data= "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
418  "<RunInfo>\n"
419  "\t<Run Id=\"170208_XXXXXX_0021_YYYYYYYY\" Number=\"21\">\n"
420  "\t\t<Flowcell>YYYYYYYY</Flowcell>\n"
421  "\t\t<Instrument>XXXXXX</Instrument>\n"
422  "\t\t<Date>2/8/2017 4:25:41 PM</Date>\n"
423  "\t\t<Reads>\n"
424  "\t\t\t<Read Number=\"1\" NumCycles=\"151\" IsIndexedRead=\"N\"/>\n"
425  "\t\t\t<Read Number=\"2\" NumCycles=\"8\" IsIndexedRead=\"Y\"/>\n"
426  "\t\t\t<Read Number=\"3\" NumCycles=\"8\" IsIndexedRead=\"Y\"/>\n"
427  "\t\t\t<Read Number=\"4\" NumCycles=\"151\" IsIndexedRead=\"N\"/>\n"
428  "\t\t</Reads>\n"
429  "\t\t<FlowcellLayout LaneCount=\"2\" SurfaceCount=\"2\" SwathCount=\"4\" TileCount=\"88\" FlowcellSide=\"1\">\n"
430  "\t\t\t<TileSet TileNamingConvention=\"FourDigit\">\n"
431  "\t\t\t\t<Tiles>\n"
432  "\t\t\t\t\t<Tile>1_2101</Tile>\n"
433  "\t\t\t\t\t<Tile>1_2102</Tile>\n"
434  "\t\t\t\t</Tiles>\n"
435  "\t\t\t</TileSet>\n"
436  "\t\t</FlowcellLayout>\n"
437  "\t\t<AlignToPhiX/>\n"
438  "\t\t<ImageDimensions Width=\"3200\" Height=\"3607\"/>\n"
439  "\t\t<ImageChannels>\n"
440  "\t\t\t<Name>RED</Name>\n"
441  "\t\t\t<Name>GREEN</Name>\n"
442  "\t\t</ImageChannels>\n"
443  "\t</Run>\n"
444  "</RunInfo>";
445  }
451  static void create_expected(model::run::info& expected_run_info, const std::vector<model::run::read_info>& reads)
452  {
453  std::string tiles[] = {
454  "1_2101",
455  "1_2102"
456  };
457  const std::string channels[] = {"RED", "GREEN"};
458  expected_run_info = model::run::info("170208_XXXXXX_0021_YYYYYYYY" /* run id */,
459  "2/8/2017 4:25:41 PM" /* date */ ,
460  "XXXXXX" /* instrument name*/,
461  21 /* run number */,
462  0 ,
463  model::run::flowcell_layout(2 /*lane count*/,
464  2 /*surface count*/,
465  4 /*swath count */,
466  88 /*tile count */,
467  1 /* sections per lane */,
468  1 /* lanes per section*/,
469  util::to_vector(tiles) /* Tiles */,
471  "YYYYYYYY" /* flowcell id */),
472  util::to_vector(channels) /*Image channels */,
473  model::run::image_dimensions(/*Width*/ 3200, /*Height*/ 3607),
474  reads);
475  }
480  static void create_expected(model::run::info& expected_run_info)
481  {
482  const model::run::read_info reads[] = {
483  /*Number, IsIndexedRead, CycleStart, CycleEnd*/
484  model::run::read_info(1, 1, 151, false),
485  model::run::read_info(2, 152, 159, true),
486  model::run::read_info(3, 160, 167, true),
487  model::run::read_info(4, 168, 318, false)
488  };
489  create_expected(expected_run_info, util::to_vector(reads));
490  }
491  };
492 
500  static void create_string(std::string &data) {
501  data = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
502  "<RunInfo Version=\"6\">\n"
503  "\t<Run Id=\"170208_XXXXXX_0021_YYYYYYYY\" Number=\"21\">\n"
504  "\t\t<Flowcell>YYYYYYYY</Flowcell>\n"
505  "\t\t<Instrument>XXXXXX</Instrument>\n"
506  "\t\t<Date>2/8/2017 4:25:41 PM</Date>\n"
507  "\t\t<Reads>\n"
508  "\t\t\t<Read Number=\"1\" NumCycles=\"151\" IsIndexedRead=\"N\"/>\n"
509  "\t\t\t<Read Number=\"2\" NumCycles=\"8\" IsIndexedRead=\"Y\"/>\n"
510  "\t\t\t<Read Number=\"3\" NumCycles=\"8\" IsIndexedRead=\"Y\" IsReverseComplement=\"Y\" />\n"
511  "\t\t\t<Read Number=\"4\" NumCycles=\"151\" IsIndexedRead=\"N\"/>\n"
512  "\t\t</Reads>\n"
513  "\t\t<FlowcellLayout LaneCount=\"2\" SurfaceCount=\"2\" SwathCount=\"4\" TileCount=\"88\" FlowcellSide=\"1\">\n"
514  "\t\t\t<TileSet TileNamingConvention=\"FourDigit\">\n"
515  "\t\t\t\t<Tiles>\n"
516  "\t\t\t\t\t<Tile>1_2101</Tile>\n"
517  "\t\t\t\t\t<Tile>1_2102</Tile>\n"
518  "\t\t\t\t</Tiles>\n"
519  "\t\t\t</TileSet>\n"
520  "\t\t</FlowcellLayout>\n"
521  "\t\t<AlignToPhiX/>\n"
522  "\t\t<ImageDimensions Width=\"3200\" Height=\"3607\"/>\n"
523  "\t\t<ImageChannels>\n"
524  "\t\t\t<Name>RED</Name>\n"
525  "\t\t\t<Name>GREEN</Name>\n"
526  "\t\t</ImageChannels>\n"
527  "\t</Run>\n"
528  "</RunInfo>";
529  }
530 
536  static void
537  create_expected(model::run::info &expected_run_info, const std::vector<model::run::read_info> &reads) {
538  std::string tiles[] = {
539  "1_2101",
540  "1_2102"
541  };
542  const std::string channels[] = {"RED", "GREEN"};
543  expected_run_info = model::run::info("170208_XXXXXX_0021_YYYYYYYY" /* run id */,
544  "2/8/2017 4:25:41 PM" /* date */ ,
545  "XXXXXX" /* instrument name*/,
546  21 /* run number */,
547  6 ,
548  model::run::flowcell_layout(2 /*lane count*/,
549  2 /*surface count*/,
550  4 /*swath count */,
551  88 /*tile count */,
552  1 /* sections per lane */,
553  1 /* lanes per section*/,
554  util::to_vector(tiles) /* Tiles */,
556  "YYYYYYYY" /* flowcell id */),
557  util::to_vector(channels) /*Image channels */,
558  model::run::image_dimensions(/*Width*/ 3200, /*Height*/ 3607),
559  reads);
560  }
561 
566  static void create_expected(model::run::info &expected_run_info) {
567  const model::run::read_info reads[] = {
568  /*Number, IsIndexedRead, CycleStart, CycleEnd*/
569  model::run::read_info(1, 1, 151, false),
570  model::run::read_info(2, 152, 159, true),
571  model::run::read_info(3, 160, 167, true, true),
572  model::run::read_info(4, 168, 318, false)
573  };
574  create_expected(expected_run_info, util::to_vector(reads));
575  }
576  };
577 
585  static void create_string(std::string &data) {
586  data = "<?xml version=\"1.0\"?>\n"
587  "<RunInfo Version=\"6\">\n"
588  "\t<Run Id=\"200308_VH00113_9_AAAAW3GM5\" Number=\"3\">\n"
589  "\t\t<Flowcell>AAAAW3GM5</Flowcell>\n"
590  "\t\t<Instrument>VH00113</Instrument>\n"
591  "\t\t<Date>22020-03-08T01:06:02Z</Date>\n"
592  "\t\t<Reads>\n"
593  "\t\t\t<Read Number=\"1\" NumCycles=\"151\" IsIndexedRead=\"N\" IsReverseComplement=\"N\"/>\n"
594  "\t\t\t<Read Number=\"2\" NumCycles=\"151\" IsIndexedRead=\"N\" IsReverseComplement=\"N\"/>\n"
595  "\t\t</Reads>\n"
596  "\t\t<FlowcellLayout LaneCount=\"1\" SurfaceCount=\"2\" SwathCount=\"6\" TileCount=\"12\">\n"
597  "\t\t\t<TileSet TileNamingConvention=\"FourDigit\">\n"
598  "\t\t\t\t<Tiles>\n"
599  "\t\t\t\t\t<Tile>1_1101</Tile>\n"
600  "\t\t\t\t\t<Tile>1_1102</Tile>\n"
601  "\t\t\t\t\t<Tile>1_1103</Tile>\n"
602  "\t\t\t\t\t<Tile>1_1104</Tile>\n"
603  "\t\t\t\t\t<Tile>1_1105</Tile>\n"
604  "\t\t\t\t\t<Tile>1_1106</Tile>\n"
605  "\t\t\t\t\t<Tile>1_1107</Tile>\n"
606  "\t\t\t\t\t<Tile>1_1108</Tile>\n"
607  "\t\t\t\t\t<Tile>1_1109</Tile>\n"
608  "\t\t\t\t\t<Tile>1_1110</Tile>\n"
609  "\t\t\t\t\t<Tile>1_1111</Tile>\n"
610  "\t\t\t\t\t<Tile>1_1112</Tile>\n"
611  "\t\t\t\t\t<Tile>1_1201</Tile>\n"
612  "\t\t\t\t\t<Tile>1_1202</Tile>\n"
613  "\t\t\t\t\t<Tile>1_1203</Tile>\n"
614  "\t\t\t\t\t<Tile>1_1204</Tile>\n"
615  "\t\t\t\t\t<Tile>1_1205</Tile>\n"
616  "\t\t\t\t\t<Tile>1_1206</Tile>\n"
617  "\t\t\t\t\t<Tile>1_1207</Tile>\n"
618  "\t\t\t\t\t<Tile>1_1208</Tile>\n"
619  "\t\t\t\t\t<Tile>1_1209</Tile>\n"
620  "\t\t\t\t\t<Tile>1_1210</Tile>\n"
621  "\t\t\t\t\t<Tile>1_1211</Tile>\n"
622  "\t\t\t\t\t<Tile>1_1212</Tile>\n"
623  "\t\t\t\t\t<Tile>1_1301</Tile>\n"
624  "\t\t\t\t\t<Tile>1_1302</Tile>\n"
625  "\t\t\t\t\t<Tile>1_1303</Tile>\n"
626  "\t\t\t\t\t<Tile>1_1304</Tile>\n"
627  "\t\t\t\t\t<Tile>1_1305</Tile>\n"
628  "\t\t\t\t\t<Tile>1_1306</Tile>\n"
629  "\t\t\t\t\t<Tile>1_1307</Tile>\n"
630  "\t\t\t\t\t<Tile>1_1308</Tile>\n"
631  "\t\t\t\t\t<Tile>1_1309</Tile>\n"
632  "\t\t\t\t\t<Tile>1_1310</Tile>\n"
633  "\t\t\t\t\t<Tile>1_1311</Tile>\n"
634  "\t\t\t\t\t<Tile>1_1312</Tile>\n"
635  "\t\t\t\t\t<Tile>1_1401</Tile>\n"
636  "\t\t\t\t\t<Tile>1_1402</Tile>\n"
637  "\t\t\t\t\t<Tile>1_1403</Tile>\n"
638  "\t\t\t\t\t<Tile>1_1404</Tile>\n"
639  "\t\t\t\t\t<Tile>1_1405</Tile>\n"
640  "\t\t\t\t\t<Tile>1_1406</Tile>\n"
641  "\t\t\t\t\t<Tile>1_1407</Tile>\n"
642  "\t\t\t\t\t<Tile>1_1408</Tile>\n"
643  "\t\t\t\t\t<Tile>1_1409</Tile>\n"
644  "\t\t\t\t\t<Tile>1_1410</Tile>\n"
645  "\t\t\t\t\t<Tile>1_1411</Tile>\n"
646  "\t\t\t\t\t<Tile>1_1412</Tile>\n"
647  "\t\t\t\t\t<Tile>1_1501</Tile>\n"
648  "\t\t\t\t\t<Tile>1_1502</Tile>\n"
649  "\t\t\t\t\t<Tile>1_1503</Tile>\n"
650  "\t\t\t\t\t<Tile>1_1504</Tile>\n"
651  "\t\t\t\t\t<Tile>1_1505</Tile>\n"
652  "\t\t\t\t\t<Tile>1_1506</Tile>\n"
653  "\t\t\t\t\t<Tile>1_1507</Tile>\n"
654  "\t\t\t\t\t<Tile>1_1508</Tile>\n"
655  "\t\t\t\t\t<Tile>1_1509</Tile>\n"
656  "\t\t\t\t\t<Tile>1_1510</Tile>\n"
657  "\t\t\t\t\t<Tile>1_1511</Tile>\n"
658  "\t\t\t\t\t<Tile>1_1512</Tile>\n"
659  "\t\t\t\t\t<Tile>1_1601</Tile>\n"
660  "\t\t\t\t\t<Tile>1_1602</Tile>\n"
661  "\t\t\t\t\t<Tile>1_1603</Tile>\n"
662  "\t\t\t\t\t<Tile>1_1604</Tile>\n"
663  "\t\t\t\t\t<Tile>1_1605</Tile>\n"
664  "\t\t\t\t\t<Tile>1_1606</Tile>\n"
665  "\t\t\t\t\t<Tile>1_1607</Tile>\n"
666  "\t\t\t\t\t<Tile>1_1608</Tile>\n"
667  "\t\t\t\t\t<Tile>1_1609</Tile>\n"
668  "\t\t\t\t\t<Tile>1_1610</Tile>\n"
669  "\t\t\t\t\t<Tile>1_1611</Tile>\n"
670  "\t\t\t\t\t<Tile>1_1612</Tile>\n"
671  "\t\t\t\t\t<Tile>1_2101</Tile>\n"
672  "\t\t\t\t\t<Tile>1_2102</Tile>\n"
673  "\t\t\t\t\t<Tile>1_2103</Tile>\n"
674  "\t\t\t\t\t<Tile>1_2104</Tile>\n"
675  "\t\t\t\t\t<Tile>1_2105</Tile>\n"
676  "\t\t\t\t\t<Tile>1_2106</Tile>\n"
677  "\t\t\t\t\t<Tile>1_2107</Tile>\n"
678  "\t\t\t\t\t<Tile>1_2108</Tile>\n"
679  "\t\t\t\t\t<Tile>1_2109</Tile>\n"
680  "\t\t\t\t\t<Tile>1_2110</Tile>\n"
681  "\t\t\t\t\t<Tile>1_2111</Tile>\n"
682  "\t\t\t\t\t<Tile>1_2112</Tile>\n"
683  "\t\t\t\t\t<Tile>1_2201</Tile>\n"
684  "\t\t\t\t\t<Tile>1_2202</Tile>\n"
685  "\t\t\t\t\t<Tile>1_2203</Tile>\n"
686  "\t\t\t\t\t<Tile>1_2204</Tile>\n"
687  "\t\t\t\t\t<Tile>1_2205</Tile>\n"
688  "\t\t\t\t\t<Tile>1_2206</Tile>\n"
689  "\t\t\t\t\t<Tile>1_2207</Tile>\n"
690  "\t\t\t\t\t<Tile>1_2208</Tile>\n"
691  "\t\t\t\t\t<Tile>1_2209</Tile>\n"
692  "\t\t\t\t\t<Tile>1_2210</Tile>\n"
693  "\t\t\t\t\t<Tile>1_2211</Tile>\n"
694  "\t\t\t\t\t<Tile>1_2212</Tile>\n"
695  "\t\t\t\t\t<Tile>1_2301</Tile>\n"
696  "\t\t\t\t\t<Tile>1_2302</Tile>\n"
697  "\t\t\t\t\t<Tile>1_2303</Tile>\n"
698  "\t\t\t\t\t<Tile>1_2304</Tile>\n"
699  "\t\t\t\t\t<Tile>1_2305</Tile>\n"
700  "\t\t\t\t\t<Tile>1_2306</Tile>\n"
701  "\t\t\t\t\t<Tile>1_2307</Tile>\n"
702  "\t\t\t\t\t<Tile>1_2308</Tile>\n"
703  "\t\t\t\t\t<Tile>1_2309</Tile>\n"
704  "\t\t\t\t\t<Tile>1_2310</Tile>\n"
705  "\t\t\t\t\t<Tile>1_2311</Tile>\n"
706  "\t\t\t\t\t<Tile>1_2312</Tile>\n"
707  "\t\t\t\t\t<Tile>1_2401</Tile>\n"
708  "\t\t\t\t\t<Tile>1_2402</Tile>\n"
709  "\t\t\t\t\t<Tile>1_2403</Tile>\n"
710  "\t\t\t\t\t<Tile>1_2404</Tile>\n"
711  "\t\t\t\t\t<Tile>1_2405</Tile>\n"
712  "\t\t\t\t\t<Tile>1_2406</Tile>\n"
713  "\t\t\t\t\t<Tile>1_2407</Tile>\n"
714  "\t\t\t\t\t<Tile>1_2408</Tile>\n"
715  "\t\t\t\t\t<Tile>1_2409</Tile>\n"
716  "\t\t\t\t\t<Tile>1_2410</Tile>\n"
717  "\t\t\t\t\t<Tile>1_2411</Tile>\n"
718  "\t\t\t\t\t<Tile>1_2412</Tile>\n"
719  "\t\t\t\t\t<Tile>1_2501</Tile>\n"
720  "\t\t\t\t\t<Tile>1_2502</Tile>\n"
721  "\t\t\t\t\t<Tile>1_2503</Tile>\n"
722  "\t\t\t\t\t<Tile>1_2504</Tile>\n"
723  "\t\t\t\t\t<Tile>1_2505</Tile>\n"
724  "\t\t\t\t\t<Tile>1_2506</Tile>\n"
725  "\t\t\t\t\t<Tile>1_2507</Tile>\n"
726  "\t\t\t\t\t<Tile>1_2508</Tile>\n"
727  "\t\t\t\t\t<Tile>1_2509</Tile>\n"
728  "\t\t\t\t\t<Tile>1_2510</Tile>\n"
729  "\t\t\t\t\t<Tile>1_2511</Tile>\n"
730  "\t\t\t\t\t<Tile>1_2512</Tile>\n"
731  "\t\t\t\t\t<Tile>1_2601</Tile>\n"
732  "\t\t\t\t\t<Tile>1_2602</Tile>\n"
733  "\t\t\t\t\t<Tile>1_2603</Tile>\n"
734  "\t\t\t\t\t<Tile>1_2604</Tile>\n"
735  "\t\t\t\t\t<Tile>1_2605</Tile>\n"
736  "\t\t\t\t\t<Tile>1_2606</Tile>\n"
737  "\t\t\t\t\t<Tile>1_2607</Tile>\n"
738  "\t\t\t\t\t<Tile>1_2608</Tile>\n"
739  "\t\t\t\t\t<Tile>1_2609</Tile>\n"
740  "\t\t\t\t\t<Tile>1_2610</Tile>\n"
741  "\t\t\t\t\t<Tile>1_2611</Tile>\n"
742  "\t\t\t\t\t<Tile>1_2612</Tile>\n"
743  "\t\t\t\t</Tiles>\n"
744  "\t\t\t</TileSet>\n"
745  "\t\t</FlowcellLayout>\n"
746  "\t\t<ImageDimensions Width=\"8208\" Height=\"5541\"/>\n"
747  "\t\t<ImageChannels>\n"
748  "\t\t\t<Name>green</Name>\n"
749  "\t\t\t<Name>blue</Name>\n"
750  "\t\t</ImageChannels>\n"
751  "\t</Run>\n"
752  "</RunInfo>\n";
753  }
754 
760  static void
761  create_expected(model::run::info &expected_run_info, const std::vector<model::run::read_info> &reads) {
762  const size_t lane_count = 1;
763  const size_t surface_count = 2;
764  const size_t swath_count = 6;
765  const size_t tile_count = 12;
766  std::vector<std::string> tiles;
767  for(size_t lane=1;lane<=lane_count;++lane)
768  {
769  const std::string lane_str = util::lexical_cast<std::string>(lane);
770  for(size_t surface=1;surface<=surface_count;++surface)
771  {
772  for(size_t swath=1;swath<=swath_count;++swath)
773  {
774  for(size_t tile=1;tile<=tile_count;++tile)
775  {
776  const std::string tile_str = util::lexical_cast<std::string>(surface*1000+swath*100+tile);
777  tiles.push_back(lane_str+"_"+tile_str);
778  }
779  }
780  }
781  }
782  const std::string channels[] = {"green", "blue"};
783  expected_run_info = model::run::info("200308_VH00113_9_AAAAW3GM5" /* run id */,
784  "22020-03-08T01:06:02Z" /* date */ ,
785  "VH00113" /* instrument name*/,
786  3 /* run number */,
787  6 ,
788  model::run::flowcell_layout(lane_count,
789  surface_count,
790  swath_count,
791  tile_count,
792  1 /* sections per lane */,
793  1 /* lanes per section*/,
794  tiles /* Tiles */,
796  "AAAAW3GM5" /* flowcell id */),
797  util::to_vector(channels) /*Image channels */,
798  model::run::image_dimensions(/*Width*/ 8208, /*Height*/ 5541),
799  reads);
800  }
801 
806  static void create_expected(model::run::info &expected_run_info) {
807  const model::run::read_info reads[] = {
808  /*Number, IsIndexedRead, CycleStart, CycleEnd*/
809  model::run::read_info(1, 1, 151, false),
810  model::run::read_info(2, 152, 302, false)
811  };
812  create_expected(expected_run_info, util::to_vector(reads));
813  }
814  };
815 }}}
816 
817 
static void create_string(std::string &data)
Definition: info_test.h:585
static void create_expected(model::run::info &expected_run_info, const std::vector< model::run::read_info > &reads)
Definition: info_test.h:537
static void create_expected(model::run::info &expected_run_info)
Definition: info_test.h:226
static void create_expected(model::run::info &expected_run_info, const std::vector< model::run::read_info > &reads)
Definition: info_test.h:46
Definition: enum_description.h:15
static void create_string(std::string &data)
Definition: info_test.h:500
static void create_string(std::string &data)
Definition: info_test.h:331
static void create_expected(model::run::info &expected_run_info, const std::vector< model::run::read_info > &reads)
Definition: info_test.h:280
inline::uint32_t swath(const ::uint32_t tile_id, const constants::tile_naming_method method)
Definition: tile_metric.h:105
inline::uint32_t surface(const ::uint32_t tile_id, const constants::tile_naming_method method)
Definition: tile_metric.h:93
static void create_string(std::string &data)
Definition: info_test.h:24
static void create_expected(model::run::info &expected_run_info)
Definition: info_test.h:806
static void create_expected(model::run::info &expected_run_info)
Definition: info_test.h:309
static void create_string(std::string &data)
Definition: info_test.h:161
static void create_expected(model::run::info &expected_run_info, const std::vector< model::run::read_info > &reads)
Definition: info_test.h:117
static void create_string(std::string &data)
Definition: info_test.h:245
Definition: image_dimensions.h:19
static void create_expected(model::run::info &expected_run_info)
Definition: info_test.h:566
static void create_string(std::string &data)
Definition: info_test.h:91
static void create_expected(model::run::info &expected_run_info)
Definition: info_test.h:70
static void create_expected(model::run::info &expected_run_info, const std::vector< model::run::read_info > &reads)
Definition: info_test.h:451
static void create_expected(model::run::info &expected_run_info)
Definition: info_test.h:480
static void create_expected(model::run::info &expected_run_info, const std::vector< model::run::read_info > &reads)
Definition: info_test.h:761
static void create_expected(model::run::info &expected_run_info)
Definition: info_test.h:394
Definition: flowcell_layout.h:20
static void create_expected(model::run::info &expected_run_info, const std::vector< model::run::read_info > &reads)
Definition: info_test.h:365
static void create_expected(model::run::info &expected_run_info)
Definition: info_test.h:141
static void create_expected(model::run::info &expected_run_info, const std::vector< model::run::read_info > &reads)
Definition: info_test.h:197
Destination lexical_cast(const Source &src)
Definition: lexical_cast.h:264
static void create_string(std::string &data)
Definition: info_test.h:415