From: Brandon King Date: Wed, 17 Jun 2009 18:14:47 +0000 (+0000) Subject: * Fixed urls for result_fc_cnm_eland_lane and summaryhtm_fc_cnm functions. X-Git-Tag: 0.2.3~1 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=0b966ec291b60009c44e091538d48ede6fd57be5 * Fixed urls for result_fc_cnm_eland_lane and summaryhtm_fc_cnm functions. * Added listing of hard drives the results have been archived to on the "Raw Result Files" table. --- diff --git a/htsworkflow/frontend/samples/views.py b/htsworkflow/frontend/samples/views.py index b8956d5..e64ce67 100644 --- a/htsworkflow/frontend/samples/views.py +++ b/htsworkflow/frontend/samples/views.py @@ -320,6 +320,23 @@ def _make_eland_results(flowcell_id, lane, interesting_flowcells): 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) @@ -331,6 +348,7 @@ def _make_eland_results(flowcell_id, lane, interesting_flowcells): 'result_url': result_link[0], 'result_label': result_link[1], 'bed_url': result_link[2], + 'storage_ids': storage_ids }) return results diff --git a/htsworkflow/frontend/templates/samples/library_detail.html b/htsworkflow/frontend/templates/samples/library_detail.html index 4c5c2b8..9843e94 100644 --- a/htsworkflow/frontend/templates/samples/library_detail.html +++ b/htsworkflow/frontend/templates/samples/library_detail.html @@ -44,6 +44,7 @@ Summary Eland Bed + Archived {% for result in eland_results %} @@ -57,6 +58,11 @@ Bed {% endif %} + + {% if result.storage_ids %} + {{ result.storage_ids }} + {% endif %} + {% endfor %} diff --git a/htsworkflow/frontend/urls.py b/htsworkflow/frontend/urls.py index 8a558d1..f5f014c 100644 --- a/htsworkflow/frontend/urls.py +++ b/htsworkflow/frontend/urls.py @@ -30,9 +30,9 @@ urlpatterns = patterns('', (r'^library_id_to_admin_url/(?P\w+)/$', 'htsworkflow.frontend.samples.views.library_id_to_admin_url'), # Raw result files - (r'^results/(?P\w+)/(?PC[1-9]-[0-9]+)/summary/', + (r'^results/(?P\w+)/(?PC[1-9]-[0-9]+)/summary/', 'htsworkflow.frontend.samples.views.summaryhtm_fc_cnm'), - (r'^results/(?P\w+)/(?PC[1-9]-[0-9]+)/eland_result/(?P[1-8])', + (r'^results/(?P\w+)/(?PC[1-9]-[0-9]+)/eland_result/(?P[1-8])', 'htsworkflow.frontend.samples.views.result_fc_cnm_eland_lane'), (r'^results/(?P\w+)/(?PC[1-9]-[0-9]+)/bedfile/(?P[1-8])/ucsc', 'htsworkflow.frontend.samples.views.bedfile_fc_cnm_eland_lane_ucsc'),