# extract just the field name
description = [ f[0] for f in c.description]
for row in c:
- row_dict = dict(zip(description, row))
+ row_dict = dict(list(zip(description, row)))
table[row_dict[pkey_name]] = row_dict
c.close()
return table
"""
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()
+ for fc_id, fc in list(self.flowcells.items()):
+ lane_library = [ (x[0][5], x[1]) for x in list(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'):
+ if 'lanes' not in self.library[library_id]:
self.library[library_id]['lanes'] = []
self.library[library_id]['lanes'].append((fc_id, lane))
# extract just the field name
description = [ f[0] for f in c.description ]
for row in c:
- row_dict = dict(zip(description, row))
+ row_dict = dict(list(zip(description, row)))
fcid, status = self._parse_flowcell_id(row_dict)
row_dict['flowcell_id'] = fcid
row_dict['flowcell_status'] = status
# sort flowcells by run date
flowcell_list = []
- for key, cell in flowcells.items():
+ for key, cell in list(flowcells.items()):
flowcell_list.append( (cell['run_date'], key) )
flowcell_list.sort()