* Fixed urls for result_fc_cnm_eland_lane and summaryhtm_fc_cnm functions.
authorBrandon King <kingb@caltech.edu>
Wed, 17 Jun 2009 18:14:47 +0000 (18:14 +0000)
committerBrandon King <kingb@caltech.edu>
Wed, 17 Jun 2009 18:14:47 +0000 (18:14 +0000)
 * Added listing of hard drives the results have been archived to on the "Raw Result Files" table.

htsworkflow/frontend/samples/views.py
htsworkflow/frontend/templates/samples/library_detail.html
htsworkflow/frontend/urls.py

index b8956d5b20342f6d24e6b802ac6e48a9601187cf..e64ce6748660c8034b4e8589399fed138a1a6d8b 100644 (file)
@@ -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
 
index 4c5c2b889e678a65edd3fb94eef06c0a2a6ddbab..9843e94d5f5183b1f6b853d011d0fe096500cf17 100644 (file)
@@ -44,6 +44,7 @@
     <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>
index 8a558d182e066107c71040fc1ddbb5c2a9332a54..f5f014c02341fa5229f8b71850eb5f4c7a60bddc 100644 (file)
@@ -30,9 +30,9 @@ urlpatterns = patterns('',
     (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'),