if cur_fc is None:
return []
+ # Loop throw storage devices if a result has been archived
+ storage_id_list = []
+ for lts in cur_fc.longtermstorage_set.all():
+ for sd in lts.storage_devices.all():
+ # Use barcode_id if it exists
+ if sd.barcode_id is not None and sd.barcode_id != '':
+ storage_id_list.append(sd.barcode_id)
+ # Otherwise use UUID
+ else:
+ storage_id_list.append(sd.uuid)
+
+ # Formatting for template use
+ if len(storage_id_list) == 0:
+ storage_ids = None
+ else:
+ storage_ids = ', '.join(storage_id_list)
+
results = []
for cycle in cur_fc.keys():
result_path = cur_fc[cycle]['eland_results'].get(lane, None)
'result_url': result_link[0],
'result_label': result_link[1],
'bed_url': result_link[2],
+ 'storage_ids': storage_ids
})
return results
<td>Summary</td>
<td>Eland</td>
<td>Bed</td>
+ <td>Archived</td>
</tr>
{% for result in eland_results %}
<tr>
<a href="{{ result.bed_url }}">Bed</a>
{% endif %}
</td>
+ <td>
+ {% if result.storage_ids %}
+ {{ result.storage_ids }}
+ {% endif %}
+ </td>
</tr>
{% endfor %}
</table>
(r'^library_id_to_admin_url/(?P<lib_id>\w+)/$',
'htsworkflow.frontend.samples.views.library_id_to_admin_url'),
# Raw result files
- (r'^results/(?P<fc_id>\w+)/(?P<cnm>C[1-9]-[0-9]+)/summary/',
+ (r'^results/(?P<flowcell_id>\w+)/(?P<cnm>C[1-9]-[0-9]+)/summary/',
'htsworkflow.frontend.samples.views.summaryhtm_fc_cnm'),
- (r'^results/(?P<fc_id>\w+)/(?P<cnm>C[1-9]-[0-9]+)/eland_result/(?P<lane>[1-8])',
+ (r'^results/(?P<flowcell_id>\w+)/(?P<cnm>C[1-9]-[0-9]+)/eland_result/(?P<lane>[1-8])',
'htsworkflow.frontend.samples.views.result_fc_cnm_eland_lane'),
(r'^results/(?P<fc_id>\w+)/(?P<cnm>C[1-9]-[0-9]+)/bedfile/(?P<lane>[1-8])/ucsc',
'htsworkflow.frontend.samples.views.bedfile_fc_cnm_eland_lane_ucsc'),