else:
summary['amplified_from'] = ''
lanes_run = 0
- for lane_id in LANE_LIST:
- lane = getattr(lib, 'lane_%d_library' % (lane_id,))
- lanes_run += len( lane.all() )
+ #for lane_id in LANE_LIST:
+ # lane = getattr(lib, 'lane_%d_library' % (lane_id,))
+ # lanes_run += len( lane.all() )
+ lanes_run = lib.lane_set.count()
summary['lanes_run'] = lanes_run
summary['is_archived'] = lib.is_archived()
records.append(summary)
flowcell_list = []
interesting_flowcells = {} # aka flowcells we're looking at
- for lane in LANE_LIST:
- lane_library = getattr(lib, 'lane_%d_library' % (lane,))
- for fc in lane_library.all():
- flowcell_id, id = parse_flowcell_id(fc.flowcell_id)
- if flowcell_id not in interesting_flowcells:
- interesting_flowcells[flowcell_id] = get_flowcell_result_dict(flowcell_id)
- flowcell_list.append((fc.flowcell_id, lane))
+ #for lane in LANE_LIST:
+ for lane in lib.lane_set.all():
+ #lane_library = getattr(lib, 'lane_%d_library' % (lane,))
+ #for fc in lane_library.all():
+ fc = lane.flowcell
+ flowcell_id, id = parse_flowcell_id(fc.flowcell_id)
+ if flowcell_id not in interesting_flowcells:
+ interesting_flowcells[flowcell_id] = get_flowcell_result_dict(flowcell_id)
+ flowcell_list.append((fc.flowcell_id, lane.lane_number))
flowcell_list.sort()
lane_summary_list = []
eland_results = []
- for fc, lane in flowcell_list:
- lane_summary, err_list = _summary_stats(fc, lane)
+ for fc, lane_number in flowcell_list:
+ lane_summary, err_list = _summary_stats(fc, lane_number)
- eland_results.extend(_make_eland_results(fc, lane, interesting_flowcells))
+ eland_results.extend(_make_eland_results(fc, lane_number, interesting_flowcells))
lane_summary_list.extend(lane_summary)
context = {
eland_summary = ResultLane(lane_id=lane_id, end=end)
# add information to lane_summary
eland_summary.flowcell_id = flowcell_id
- eland_summary.clusters = gerald_summary[end][lane_id].cluster
+ if len(gerald_summary) > end and gerald_summary[end].has_key(lane_id):
+ eland_summary.clusters = gerald_summary[end][lane_id].cluster
+ else:
+ eland_summary.clusters = 'n/a'
eland_summary.cycle_width = cycle_width
if hasattr(eland_summary, 'genome_map'):
eland_summary.summarized_reads = runfolder.summarize_mapped_reads(
# grab some more information out of the flowcell db
flowcell = FlowCell.objects.get(flowcell_id=flowcell_id)
- pm_field = 'lane_%d_pM' % (lane_id)
- eland_summary.successful_pm = getattr(flowcell, pm_field)
+ #pm_field = 'lane_%d_pM' % (lane_id)
+ lane_obj = flowcell.lane_set.get(lane_number=lane_id)
+ eland_summary.successful_pm = lane_obj.pM
summary_list.append(eland_summary)
if len(storage_id_list) == 0:
storage_ids = None
else:
- storage_ids = ', '.join(storage_id_list)
+ storage_ids = ', '.join([ '<a href="/inventory/%s/">%s</a>' % (s,s) for s in storage_id_list ])
results = []
for cycle in cur_fc.keys():