# 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))
attach the library dictionary to the instance
"""
self.library = self._make_dict_from_table(
- 'fctracker_library',
- 'library_id')
+ 'samples_library',
+ 'id')
def _get_species(self):
attach the species dictionary to the instance
"""
self.species = self._make_dict_from_table(
- 'fctracker_species',
+ 'samples_species',
'id'
)
where = ""
self.flowcells = {}
c = self.conn.cursor()
- c.execute('select * from fctracker_flowcell %s;' % (where))
+ c.execute('select * from experiments_flowcell %s;' % (where))
# 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()