Use htsworkflow ontology to validate various RDF using components.
[htsworkflow.git] / htsworkflow / frontend / templates / samples / library_detail.html
1 {% extends "base_site.html" %}
2 {% load adminmedia humanize i18n %}
3 {% block extrahead %}
4     <!-- App Stuff -->
5     <link type="text/css" rel="stylesheet" href="/static/css/app.css" />
6     <script type="text/javascript" src="/static/js/jquery.min.js"></script>
7
8     {% block additional_javascript %}
9     {% endblock %}
10 {% endblock %}
11
12 {% block content %}
13   {% include "sample_header.html" %}
14   <hr/>
15   <div class="library_statistics">
16   <h2>Raw Result Files</h2>
17   <table>
18   <thead>
19     <tr>
20       <td>Run Start Date</td>
21       <td>Cycle</td>
22       <td>Flowcell</td>
23       <td>Lane</td>
24       <td>Summary</td>
25       <td>Eland</td>
26       <td>Bed</td>
27       <td>Archived</td>
28     </tr>
29   </thead>
30   <tbody>
31     {% for result in eland_results %}
32     <tr about="{{result.flowcell.get_absolute_url}}">
33       <td property="libns:date" content="{{result.run_date|date:'Y-m-d\TH:i:s'}}" datatype="xsd:dateTime">{{ result.run_date|date}}</td>
34       <td>{{ result.cycle }}</td>
35       <td><a href="{{result.flowcell.get_absolute_url}}"><span property="libns:flowcell_id">{{ result.flowcell_id }}</span></a>{% if user.is_staff %}<a href="{{result.flowcell.get_admin_url}}"><img class="icon_button" src="/media/img/admin/icon_changelink.gif" alt="Edit"/></a>{% endif%}</td>
36       <td>{{ result.lane.lane_number }}</td>
37       <td><a href="{{ result.summary_url }}">Summary</a></td>
38       <td><a href="{{ result.result_url }}">{{ result.result_label }}</a></td>
39       <td>
40       {% if result.bed_url %}
41         <a href="{{ result.bed_url }}">Bed</a>
42       {% endif %}
43       </td>
44       <td>
45         {% if result.storage_ids %}
46           {{ result.storage_ids|safe }}
47         {% endif %}
48       </td>
49     </tr>
50     {% endfor %}
51   </tbody>
52   </table>
53
54   <h2>Lane Summary Statistics</h2>
55   {% block summary_stats %}
56   <table>
57     <thead>
58       <tr>
59         <td colspan="7"></td>
60         <td colspan="2">No Match</td>
61         <td colspan="2">QC Failed</td>
62         <td colspan="4">Unique</td>
63         <td colspan="4">Repeat</td>
64       </tr>
65       <tr>
66       <td>Cycles</td>
67       <td>Flowcell</td>
68       <td>Lane</td>
69       <td>End</td>
70       <td>Cluster / Tile</td>
71       <td>pM</td>
72       <td>Raw Reads</td>
73       <td>total</td>
74       <td>%</td>
75       <td>total</td>
76       <td>%</td>
77       <td>0 mismatch</td>
78       <td>1 mismatch</td>
79       <td>2 mismatch</td>
80       <td>Total</td>
81       <td>0 mismatch</td>
82       <td>1 mismatch</td>
83       <td>2 mismatch</td>
84       <td>Total</td>
85       </tr>
86     </thead>
87     <tbody>
88
89       {# ls short for lane summary #}
90       {% for ls in lane_summary_list %}
91       <tr about="{{ls.lane.get_absolute_url}}">
92         <td>{{ ls.cycle_width }}</td>
93         <td><a href="{{ls.flowcell.get_absolute_url}}">{{ ls.flowcell_id }}</a>
94         </td>
95         <td><a href="{{ls.lane.get_absolute_url}}">{{ ls.lane_id }}</a></td>
96         <td>{% if ls.end %}{{ ls.end }}{% endif %}</td>
97         <td>{{ ls.clusters.0|intcomma }}</td>
98         <td>{{ ls.successful_pm }}</td>
99         <td>{{ ls.reads|intcomma }}</td>
100         <td>{{ ls.no_match|intcomma }}</td>
101         <td>{{ ls.no_match_percent|stringformat:".2f" }}</td>
102         <td>{{ ls.qc_failed|intcomma }}</td>
103         <td>{{ ls.qc_failed_percent|stringformat:".2f" }}</td>
104         <td>{{ ls.match_codes.U0|intcomma }}</td>
105         <td>{{ ls.match_codes.U1|intcomma }}</td>
106         <td>{{ ls.match_codes.U2|intcomma }}</td>
107         <td {% if ls.unique_reads %}property="libns:total_unique_locations" content="{{ls.unique_reads}}" datatype="xsd:decimal"{% endif %}>{{ ls.unique_reads|intcomma }}</td>
108         <td>{{ ls.match_codes.R0|intcomma }}</td>
109         <td>{{ ls.match_codes.R1|intcomma }}</td>
110         <td>{{ ls.match_codes.R2|intcomma }}</td>
111         <td>{{ ls.repeat_reads|intcomma }}</td>
112       </tr>
113       {% endfor %}
114     </tbody>
115   </table>
116
117   <h2>Flowcell Notes</h2>
118   <table>
119     <thead>
120       <tr>
121         <td>Flowcell ID</td>
122         <td>Lane</td>
123         <td>Comment</td>
124       </tr>
125     </thead>
126     <tbody>
127       {% for lane in lib.lane_set.all %}
128       <tr rel="libns:has_lane" resource="{{lane.get_absolute_url}}">
129         <td>
130           <a typeof="libns:IlluminaFlowcell" href="{{lane.flowcell.get_absolute_url}}">
131             <span property="libns:flowcell_id"
132                   >{{lane.flowcell.flowcell_id}}</span></a>
133           {% if user.is_staff %}
134             <a href="{{lane.flowcell.get_admin_url}}">
135                <img class="icon_button"
136                     src="/media/img/admin/icon_changelink.gif" alt="Edit"/>
137             </a>
138           {% endif%}
139         </td>
140         <td typeof="libns:IlluminaLane" about="{{lane.get_absolute_url}}">
141           <span rel="libns:flowcell" resource="{{lane.flowcell.get_absolute_url}}"></span>
142           <a href="{{lane.get_absolute_url}}">
143             <span property="libns:lane_number"  datatype="xsd:decimal"
144                >{{ lane.lane_number }}</span>
145             </a></td>
146         <td>{{ lane.comment }}</td>
147       </tr>
148           {% endfor %}
149     </tbody>
150   </table>
151   <br/>
152   <hr/>
153   <h2>Count of multi-reads</h2>
154   {% for eland_lane in lane_summary_list %}
155     {% if eland_lane.summarized_reads %}
156     <h3>{{eland_lane.cycle_width}} {{ eland_lane.flowcell_id }} lane {{ eland_lane.lane_id }}
157       {% if eland_lane.end %} end {{ eland_lane.end }}{% endif %}
158     </h3>
159     <ul about="{{eland_lane.lane.get_absolute_url}}">
160       {% for name, counts in eland_lane.summarized_reads.items %}
161       <li rel="libns:has_mappings">
162          <b property="libns:mapped_to">{{ name }}</b>:
163          <span property="libns:reads" content="{{counts}}" datatype="xsd:integer">{{ counts|intcomma }}</span></li>
164       {% endfor %}
165     </ul>
166     {% endif %}
167   {% endfor %}
168   {% endblock %}
169   </div>
170 </div>
171 {% endblock %}