This mildly adjusts the css to be a bit prettier
[htsworkflow.git] / htsworkflow / frontend / templates / samples / library_detail.html
1 {% extends "flowcell_libraries_app.html" %}
2 {% load humanize %}
3
4 {% block additional_css %}
5 <style type="text/css">
6   /* <![CDATA[ */
7   div#librarydetail {
8     margin: 0;
9     padding: 0;
10   }
11   div#librarydetail table, div#librarydetail td {
12     border-style: solid;
13   }
14   div#librarydetail table {
15     border-width: 0 0 1px 1px;
16     border-spacing: 0;
17     border-collapse: collapse;
18   }
19   div#librarydetail td {
20     margin: 0;
21     padding: 3px;
22     border-width: 1px 1px 0 0;
23   }
24   div#librarydetail thead {
25     text-align: center;
26     }
27   div#librarydetail tbody {
28     text-align: right;
29   }
30   div#librarydetail h1,
31   div#librarydetail h2
32   {
33     font-size: 150%;
34   }
35
36   div#librarydetail h3 {
37      font-size: 125%;
38      margin: 0;
39   }
40
41   div#librarydetail h4,
42   div#librarydetail h5,
43   div#librarydetail ul,
44   div#librarydetail ol,
45   div#librarydetail li
46   {
47     list-style: none;
48     margin: 0;   
49   }
50
51   div#librarydetail ul,
52   div#librarydetail ol
53   {
54     margin-bottom: .5em;
55   }
56  /* ]]> */
57 </style>
58 {% endblock %}
59
60 {% block content %}
61 <div id="librarydetail">
62   <h2>About this library</h2>
63   <b>Library ID</b>: {{ lib.id }}<br/>
64   <b>Name</b>: {{ lib.library_name }}<br/>
65   <b>Species</b>: {{ lib.library_species.scientific_name }}<br/>
66   <b>Concentration</b>: {{ lib.undiluted_concentration }} ng/µl<br/>
67   <b>Gel Cut Size</b>: {{ lib.gel_cut_size }}<br/>
68   <b>Insert Size</b>: {{ lib.insert_size }}<br/>
69   <b>Made By</b>: {{ lib.made_by }} <br/>
70   <b>Affiliations</b>:
71   <ul>
72     {% for individual in lib.affiliations.all %}
73       <li>{{ individual.name }} ( {{ individual.contact }} )</li>
74     {% endfor %}
75   </ul>
76   
77   <h2>Raw Result Files</h2>
78   <table>
79   <thead>
80     <tr>
81       <td>Run Start Date</td>
82       <td>Cycle</td>
83       <td>Flowcell</td>
84       <td>Lane</td>
85       <td>Summary</td>
86       <td>Eland</td>
87       <td>Bed</td>
88       <td>Archived</td>
89     </tr>
90   {% for result in eland_results %}
91   <tr>
92     <td>{{ result.run_date|date }}</td>
93     <td>{{ result.cycle }}</td>
94     <td>{{ result.flowcell_id }}</td>
95     <td>{{ result.lane }}</td>
96     <td><a href="{{ result.summary_url }}">Summary</a></td>
97     <td><a href="{{ result.result_url }}">{{ result.result_label }}</a></td>
98     <td>
99     {% if result.bed_url %}
100       <a href="{{ result.bed_url }}">Bed</a>
101     {% endif %}
102     </td>
103     <td>
104       {% if result.storage_ids %}
105         {{ result.storage_ids|safe }}
106       {% endif %}
107     </td>
108   </tr>
109   {% endfor %}
110   </table>
111   
112   <h2>Lane Summary Statistics</h2>
113   {% block summary_stats %}
114   <table>
115     <thead>
116       <tr>
117         <td colspan="7"></td>
118         <td colspan="2">No Match</td>
119         <td colspan="2">QC Failed</td>
120         <td colspan="4">Unique</td>
121         <td colspan="4">Repeat</td>
122       </tr>
123       <tr>
124       <td>Cycles</td>
125       <td>Flowcell</td>
126       <td>Lane</td>
127       <td>End</td>
128       <td>Cluster / Tile</td>
129       <td>pM</td>
130       <td>Raw Reads</td>
131       <td>total</td>
132       <td>%</td>
133       <td>total</td>
134       <td>%</td>
135       <td>0 mismatch</td>
136       <td>1 mismatch</td>
137       <td>2 mismatch</td>
138       <td>Total</td>
139       <td>0 mismatch</td>
140       <td>1 mismatch</td>
141       <td>2 mismatch</td>
142       <td>Total</td>
143       </tr>
144     </thead>
145     <tbody>
146   
147       {% for lane in lane_summary_list %}
148       <tr>
149         <td>{{ lane.cycle_width }}</td>
150         <td>{{ lane.flowcell_id }}</td>
151         <td>{{ lane.lane_id }}</td>
152         <td>{% if lane.end %}{{ lane.end }}{% endif %}</td>
153         <td>{{ lane.clusters.0|intcomma }}</td>
154         <td>{{ lane.successful_pm }}</td>
155         <td>{{ lane.reads|intcomma }}</td>
156         <td>{{ lane.no_match|intcomma }}</td>
157         <td>{{ lane.no_match_percent|stringformat:".2f" }}</td>
158         <td>{{ lane.qc_failed|intcomma }}</td>
159         <td>{{ lane.qc_failed_percent|stringformat:".2f" }}</td>
160         <td>{{ lane.match_codes.U0|intcomma }}</td>
161         <td>{{ lane.match_codes.U1|intcomma }}</td>
162         <td>{{ lane.match_codes.U2|intcomma }}</td>
163         <td>{{ lane.unique_reads|intcomma }}</td>
164         <td>{{ lane.match_codes.R0|intcomma }}</td>
165         <td>{{ lane.match_codes.R1|intcomma }}</td>
166         <td>{{ lane.match_codes.R2|intcomma }}</td>
167         <td>{{ lane.repeat_reads|intcomma }}</td>
168       </tr>
169       {% endfor %}
170     </tbody>
171   </table>
172
173   <h2>Flowcell Notes</h2>
174   <table>
175     <thead>
176       <tr>
177         <td>Flowcell ID</td>
178         <td>Lane</td>
179         <td>Comment</td>
180     </thead>
181     <tbody>
182       {% for lane in lib.lane_set.all %}
183       <tr>
184         <td>{{ lane.flowcell.flowcell_id }}</td>
185         <td>{{ lane.lane_number }}</td>
186         <td>{{ lane.comment }}</td>
187         {% endfor %}
188     </tbody>
189   </table>
190   <br/>
191   <hr/>
192   <h2>Count of multi-reads</h2>
193   {% for lane in lane_summary_list %}
194     {% if lane.summarized_reads %}
195     <h3>
196       {{lane.cycle_width}} {{ lane.flowcell_id }} lane {{ lane.lane_id }} 
197       {% if lane.end %} end {{ lane.end }}{% endif %}
198     </h3>
199     <ul>
200       {% for name, counts in lane.summarized_reads.items %}
201       <li><b>{{ name }}</b>: {{ counts|intcomma }}</li>
202       {% endfor %}
203     </ul>
204     {% endif %}
205   {% endfor %}
206   {% endblock %}
207 </div>
208 {% endblock %}