From 153235dcbff342f942dd5de2af4006aa8dd69236 Mon Sep 17 00:00:00 2001 From: Brandon King Date: Fri, 26 Jun 2009 22:23:18 +0000 Subject: [PATCH] Libraries Detail View integrated. --- htsworkflow/frontend/samples/views.py | 13 +- htsworkflow/frontend/static/js/htsw.js | 5 +- .../templates/samples/library_detail.html | 252 +++++++++--------- 3 files changed, 143 insertions(+), 127 deletions(-) diff --git a/htsworkflow/frontend/samples/views.py b/htsworkflow/frontend/samples/views.py index 853a0ff..52907ed 100644 --- a/htsworkflow/frontend/samples/views.py +++ b/htsworkflow/frontend/samples/views.py @@ -105,12 +105,17 @@ def library_to_flowcells(request, lib_id): eland_results.extend(_make_eland_results(fc, lane, interesting_flowcells)) lane_summary_list.extend(lane_summary) + context = { + 'page_name': 'Library Details', + 'lib': lib, + 'eland_results': eland_results, + 'lane_summary_list': lane_summary_list, + } + context.update(SAMPLES_CONTEXT_DEFAULTS) + return render_to_response( 'samples/library_detail.html', - {'lib': lib, - 'eland_results': eland_results, - 'lane_summary_list': lane_summary_list, - }, + context, context_instance = RequestContext(request)) def summaryhtm_fc_cnm(request, flowcell_id, cnm): diff --git a/htsworkflow/frontend/static/js/htsw.js b/htsworkflow/frontend/static/js/htsw.js index 8bbe432..83f4ac0 100644 --- a/htsworkflow/frontend/static/js/htsw.js +++ b/htsworkflow/frontend/static/js/htsw.js @@ -99,6 +99,8 @@ $(document).ready(function(){ // East panel contentEl id is supplied in html div id of east_region_config. var east_id = Ext.fly('east_region_config').dom.textContent; + // Length of zero is a valid response... also happens to return null in next + // if statement if not handled before hand. if (east_id.length == 0){ return east_id; } @@ -107,6 +109,7 @@ $(document).ready(function(){ if (Ext.fly(east_id) == null){ return 'east_region_config_error'; } + return east_id; } @@ -179,7 +182,7 @@ $(document).ready(function(){ xtype: 'panel', //autoScroll: true, layout: 'fit', - margins: '2 2 2 0', + margins: '2 0 2 0', items: [{ //title: 'Inner Panel', contentEl: 'body_content', diff --git a/htsworkflow/frontend/templates/samples/library_detail.html b/htsworkflow/frontend/templates/samples/library_detail.html index 9843e94..8838944 100644 --- a/htsworkflow/frontend/templates/samples/library_detail.html +++ b/htsworkflow/frontend/templates/samples/library_detail.html @@ -1,146 +1,154 @@ +{% extends "flowcell_libraries_app.html" %} {% load humanize %} + +{% block additional_css %} +{% endblock %} -

About this library

-Library ID: {{ lib.library_id }}
-Name: {{ lib.library_name }}
-Species: {{ lib.library_species.scientific_name }}
-Affiliations: - - -

Raw Result Files

- - - - - - - - - - - -{% for result in eland_results %} - - - - - - - - - -{% endfor %} -
CycleFlowcellLaneSummaryElandBedArchived
{{ result.cycle }}{{ result.flowcell_id }}{{ result.lane }}Summary{{ result.result_label }} - {% if result.bed_url %} - Bed - {% endif %} - - {% if result.storage_ids %} - {{ result.storage_ids }} - {% endif %} -
- -

Lane Summary Statistics

-{% block summary_stats %} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {% for lane in lane_summary_list %} - - - - - - - - - - - - - - - - - - - - - - {% endfor %} - -
No MatchQC FailedUniqueRepeat
CyclesFlowcellLaneEndCluster / TilepMRaw Readstotal%total%0 mismatch1 mismatch2 mismatchTotal0 mismatch1 mismatch2 mismatchTotal
{{ lane.cycle_width }}{{ lane.flowcell_id }}{{ lane.lane_id }}{% if lane.end %}{{ lane.end }}{% endif %}{{ lane.clusters.0|intcomma }}{{ lane.successful_pm }}{{ lane.reads|intcomma }}{{ lane.no_match|intcomma }}{{ lane.no_match_percent|stringformat:".2f" }}{{ lane.qc_failed|intcomma }}{{ lane.qc_failed_percent|stringformat:".2f" }}{{ lane.match_codes.U0|intcomma }}{{ lane.match_codes.U1|intcomma }}{{ lane.match_codes.U2|intcomma }}{{ lane.unique_reads|intcomma }}{{ lane.match_codes.R0|intcomma }}{{ lane.match_codes.R1|intcomma }}{{ lane.match_codes.R2|intcomma }}{{ lane.repeat_reads|intcomma }}
-
-
-

Count of multi-reads

-{% for lane in lane_summary_list %} - {% if lane.summarized_reads %} -

- {{lane.cycle_width}} {{ lane.flowcell_id }} lane {{ lane.lane_id }} - {% if lane.end %} end {{ lane.end }}{% endif %} -

+{% block content %} +
+

About this library

+ Library ID: {{ lib.library_id }}
+ Name: {{ lib.library_name }}
+ Species: {{ lib.library_species.scientific_name }}
+ Affiliations: - {% endif %} -{% endfor %} + +

Raw Result Files

+ + + + + + + + + + + + {% for result in eland_results %} + + + + + + + + + + {% endfor %} +
CycleFlowcellLaneSummaryElandBedArchived
{{ result.cycle }}{{ result.flowcell_id }}{{ result.lane }}Summary{{ result.result_label }} + {% if result.bed_url %} + Bed + {% endif %} + + {% if result.storage_ids %} + {{ result.storage_ids }} + {% endif %} +
+ +

Lane Summary Statistics

+ {% block summary_stats %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% for lane in lane_summary_list %} + + + + + + + + + + + + + + + + + + + + + + {% endfor %} + +
No MatchQC FailedUniqueRepeat
CyclesFlowcellLaneEndCluster / TilepMRaw Readstotal%total%0 mismatch1 mismatch2 mismatchTotal0 mismatch1 mismatch2 mismatchTotal
{{ lane.cycle_width }}{{ lane.flowcell_id }}{{ lane.lane_id }}{% if lane.end %}{{ lane.end }}{% endif %}{{ lane.clusters.0|intcomma }}{{ lane.successful_pm }}{{ lane.reads|intcomma }}{{ lane.no_match|intcomma }}{{ lane.no_match_percent|stringformat:".2f" }}{{ lane.qc_failed|intcomma }}{{ lane.qc_failed_percent|stringformat:".2f" }}{{ lane.match_codes.U0|intcomma }}{{ lane.match_codes.U1|intcomma }}{{ lane.match_codes.U2|intcomma }}{{ lane.unique_reads|intcomma }}{{ lane.match_codes.R0|intcomma }}{{ lane.match_codes.R1|intcomma }}{{ lane.match_codes.R2|intcomma }}{{ lane.repeat_reads|intcomma }}
+
+
+

Count of multi-reads

+ {% for lane in lane_summary_list %} + {% if lane.summarized_reads %} +

+ {{lane.cycle_width}} {{ lane.flowcell_id }} lane {{ lane.lane_id }} + {% if lane.end %} end {{ lane.end }}{% endif %} +

+ + {% endif %} + {% endfor %} + {% endblock %} +
{% endblock %} -- 2.30.2