From: Diane Trout Date: Mon, 13 Jun 2011 23:51:27 +0000 (-0700) Subject: Supprose IVC plot table rows if we don't have data for a lane X-Git-Tag: 0.5.2~23 X-Git-Url: http://woldlab.caltech.edu/gitweb/?a=commitdiff_plain;ds=sidebyside;h=330eaf95a7f3b1e9de3e6ae8e6c7b14303e89f7d;p=htsworkflow.git Supprose IVC plot table rows if we don't have data for a lane Django 1.1 doesn't have conditionals so I needed a different way to suppress the other lanes for the specific lane detail page. And finally the links produced by Lane.get_absolute_url needed to strip the parenthetical comment from the flowcell IDs --- diff --git a/htsworkflow/frontend/experiments/models.py b/htsworkflow/frontend/experiments/models.py index 5a97798..15209fc 100755 --- a/htsworkflow/frontend/experiments/models.py +++ b/htsworkflow/frontend/experiments/models.py @@ -183,8 +183,9 @@ class Lane(models.Model): @models.permalink def get_absolute_url(self): + flowcell_id, status = parse_flowcell_id(self.flowcell.flowcell_id) return ('htsworkflow.frontend.experiments.views.flowcell_lane_detail', - [str(self.flowcell.flowcell_id), str(self.lane_number)]) + [str(flowcell_id), str(self.lane_number)]) ### ----------------------- diff --git a/htsworkflow/frontend/experiments/views.py b/htsworkflow/frontend/experiments/views.py index e120413..a1775d4 100755 --- a/htsworkflow/frontend/experiments/views.py +++ b/htsworkflow/frontend/experiments/views.py @@ -145,10 +145,15 @@ def flowcell_lane_detail(request, flowcell_id, lane_number): fc.update_data_runs() + dataruns = [] + for run in fc.datarun_set.all(): + dataruns.append((run, lane.lane_number, run.lane_files()[lane.lane_number])) + context = RequestContext(request, {'lib': lane.library, 'lane': lane, - 'flowcell': fc}) + 'flowcell': fc, + 'filtered_dataruns': dataruns}) return render_to_response('experiments/flowcell_lane_detail.html', context) diff --git a/htsworkflow/frontend/templates/experiments/flowcell_detail.html b/htsworkflow/frontend/templates/experiments/flowcell_detail.html index b238f8b..6e112f8 100644 --- a/htsworkflow/frontend/templates/experiments/flowcell_detail.html +++ b/htsworkflow/frontend/templates/experiments/flowcell_detail.html @@ -69,6 +69,7 @@ {% for lane_id, lane_file_set in run.lane_files.items %} + {% if lane_file_set.ivc_all %} {{ lane_id }} @@ -96,6 +97,7 @@ + {% endif %} {% endfor %} diff --git a/htsworkflow/frontend/templates/experiments/flowcell_lane_detail.html b/htsworkflow/frontend/templates/experiments/flowcell_lane_detail.html index f65c9e9..bf9ee00 100644 --- a/htsworkflow/frontend/templates/experiments/flowcell_lane_detail.html +++ b/htsworkflow/frontend/templates/experiments/flowcell_lane_detail.html @@ -50,10 +50,10 @@ IVC Percent Base Called - {% for lane_id, lane_file_set in run.lane_files.items %} - {% if lane_id == lane.lane_number %} + {% for run, lane_number, lane_file_set in filtered_dataruns %} + {% if lane_file_set.ivc_all %} - {{lane_id}} + {{lane_number}}