flowcell_layout.h
Go to the documentation of this file.
1 
8 #pragma once
9 
10 #include <string>
11 #include <vector>
13 
14 namespace illumina { namespace interop { namespace model { namespace run
15 {
16 
21  {
22  public:
26  typedef std::vector<std::string> str_vector_t;
28  typedef ::uint32_t uint_t;
29 
30  public:
43  flowcell_layout(const uint_t lane_count = 1,
44  const uint_t surface_count = 1,
45  const uint_t swath_count = 1,
46  const uint_t tile_count = 1,
47  const uint_t sections_per_lane = 1,
48  const uint_t lanes_per_section = 1,
49  const str_vector_t &tiles = str_vector_t(),
50  const tile_naming_method_t naming_method = constants::UnknownTileNamingMethod,
51  const std::string &barcode = "") :
52  m_naming_method(naming_method), m_lane_count(lane_count), m_surface_count(surface_count)
53  , m_swath_count(swath_count), m_tile_count(tile_count), m_sections_per_lane(sections_per_lane)
54  , m_lanes_per_section(lanes_per_section), m_tiles(tiles), m_barcode(barcode)
55  {
56  for(uint_t surface_index = 1; surface_index <= m_surface_count; ++surface_index)
57  {
58  m_surface_list.push_back(surface_index);
59  }
60  }
61 
62  public:
75  uint_t lane_count() const
76  { return m_lane_count; }
77 
82  uint_t surface_count() const
83  { return m_surface_count; }
84 
90  bool supports_multisurface() const
91  {
92  return m_surface_list.size() > 1;
93  }
94 
100  const std::vector<uint_t> &surface_list() const
101  {
102  return m_surface_list;
103  }
104 
109  uint_t swath_count() const
110  { return m_swath_count; }
111 
116  uint_t tile_count() const
117  { return m_tile_count; }
118 
124  uint_t sections_per_lane() const
125  { return m_sections_per_lane; }
126 
132  uint_t lanes_per_section() const
133  { return m_lanes_per_section; }
134 
140  {
141  if(m_naming_method == constants::FiveDigit)
142  return m_lane_count/m_lanes_per_section * m_sections_per_lane;
143  return 0;
144  }
145 
150  tile_naming_method_t naming_method() const
151  { return m_naming_method; }
152 
157  const str_vector_t &tiles() const
158  { return m_tiles; }
159 
164  const std::string &barcode() const
165  { return m_barcode; }
172  size_t total_swaths(const bool all_surfaces) const
173  {
174  if (all_surfaces) return swath_count() * 2;
175  return swath_count();
176  }
177 
182  size_t tiles_per_lane() const
183  {
184  return tile_count() * sections_per_lane();
185  }
186 
191  size_t total_tiles()const
192  {
194  }
195 
201  {
202  m_naming_method = naming_method;
203  }
208  void lane_count(const uint_t lane_count)
209  { m_lane_count = lane_count; }
214  void surface_count(const uint_t surface_count)
215  { m_surface_count = surface_count; }
216 
221  void swath_count(const uint_t swath_count)
222  { m_swath_count = swath_count; }
227  void tile_count(const uint_t tile_count)
228  { m_tile_count = tile_count; }
233  void sections_per_lane(const uint_t count)
234  { m_sections_per_lane = count; }
239  void lanes_per_section(const uint_t count)
240  { m_lanes_per_section = count; }
241 
242  private:
243  tile_naming_method_t m_naming_method;
244  uint_t m_lane_count;
245  uint_t m_surface_count;
246  uint_t m_swath_count;
247  uint_t m_tile_count;
248  uint_t m_sections_per_lane;
249  uint_t m_lanes_per_section;
250  str_vector_t m_tiles;
251  std::string m_barcode;
252  std::vector<uint_t> m_surface_list;
253 
254  friend class info;
255  };
256 }}}}
257 
258 
flowcell_layout(const uint_t lane_count=1, const uint_t surface_count=1, const uint_t swath_count=1, const uint_t tile_count=1, const uint_t sections_per_lane=1, const uint_t lanes_per_section=1, const str_vector_t &tiles=str_vector_t(), const tile_naming_method_t naming_method=constants::UnknownTileNamingMethod, const std::string &barcode="")
Definition: flowcell_layout.h:43
Definition: enum_description.h:15
tile_naming_method_t naming_method() const
Definition: flowcell_layout.h:150
uint_t total_number_of_sections() const
Definition: flowcell_layout.h:139
uint_t swath_count() const
Definition: flowcell_layout.h:109
void set_naming_method(const constants::tile_naming_method naming_method)
Definition: flowcell_layout.h:200
std::vector< std::string > str_vector_t
Definition: flowcell_layout.h:26
constants::tile_naming_method tile_naming_method_t
Definition: flowcell_layout.h:24
uint_t lanes_per_section() const
Definition: flowcell_layout.h:132
uint_t surface_count() const
Definition: flowcell_layout.h:82
void lane_count(const uint_t lane_count)
Definition: flowcell_layout.h:208
void surface_count(const uint_t surface_count)
Definition: flowcell_layout.h:214
::uint32_t uint_t
Definition: flowcell_layout.h:28
void swath_count(const uint_t swath_count)
Definition: flowcell_layout.h:221
void sections_per_lane(const uint_t count)
Definition: flowcell_layout.h:233
uint_t sections_per_lane() const
Definition: flowcell_layout.h:124
const std::vector< uint_t > & surface_list() const
Definition: flowcell_layout.h:100
void lanes_per_section(const uint_t count)
Definition: flowcell_layout.h:239
Definition: flowcell_layout.h:20
void tile_count(const uint_t tile_count)
Definition: flowcell_layout.h:227
const std::string & barcode() const
Definition: flowcell_layout.h:164
size_t total_swaths(const bool all_surfaces) const
Definition: flowcell_layout.h:172
uint_t tile_count() const
Definition: flowcell_layout.h:116
tile_naming_method
Definition: enums.h:294
const str_vector_t & tiles() const
Definition: flowcell_layout.h:157
uint_t lane_count() const
Definition: flowcell_layout.h:75
size_t total_tiles() const
Definition: flowcell_layout.h:191
bool supports_multisurface() const
Definition: flowcell_layout.h:90
size_t tiles_per_lane() const
Definition: flowcell_layout.h:182