+ def _add_lanes_to_libraries(self):
+ """
+ add flowcell/lane ids to new attribute 'lanes' in the library dictionary
+ """
+ library_id_re = re.compile('lane_\d_library_id')
+
+ for fc_id, fc in self.flowcells.items():
+ lane_library = [ (x[0][5], x[1]) for x in fc.items()
+ if library_id_re.match(x[0]) ]
+ for lane, library_id in lane_library:
+ if not self.library[library_id].has_key('lanes'):
+ self.library[library_id]['lanes'] = []
+ self.library[library_id]['lanes'].append((fc_id, lane))
+