0aa83d07528f2f7ea82a9499a8b1c28bf4b74011
[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
11 <style type="text/css">
12   /* <![CDATA[ */
13   div#librarydetail {
14     margin: 0;
15     padding: 0;
16   }
17   div#librarydetail table, div#librarydetail td {
18     border-style: solid;
19   }
20   div#librarydetail table {
21     border-width: 0 0 1px 1px;
22     border-spacing: 0;
23     border-collapse: collapse;
24   }
25   div#librarydetail td {
26     margin: 0;
27     padding: 3px;
28     border-width: 1px 1px 0 0;
29   }
30   div#librarydetail thead {
31     text-align: center;
32     }
33   div#librarydetail tbody {
34     text-align: right;
35   }
36   div#librarydetail h1,
37   div#librarydetail h2
38   {
39     font-size: 150%;
40   }
41
42   div#librarydetail h3 {
43      font-size: 125%;
44      margin: 0;
45   }
46
47   div#librarydetail h4,
48   div#librarydetail h5,
49   div#librarydetail ul,
50   div#librarydetail ol,
51   div#librarydetail li
52   {
53     list-style: none;
54     margin: 0;   
55   }
56
57   div#librarydetail ul,
58   div#librarydetail ol
59   {
60     margin-bottom: .5em;
61   }
62  /* ]]> */
63 </style>
64 {% endblock %}
65
66 {% block content %}
67 <div id="librarydetail">
68   <h2>About this library</h2>
69   <b>Library ID</b>: {{ lib.id }}<br/>
70   <b>Name</b>: 
71     <span property="libns:name">{{ lib.library_name }}</span>
72   <br/>
73   <b>Species</b>: 
74     <span property="libns:species">{{ lib.library_species.scientific_name }}</span>
75   <br/>
76   <b>Concentration</b>: 
77     <span property="libns:concentration">{{ lib.undiluted_concentration }} ng/µl</span>
78   <br/>
79   <b>Gel Cut Size</b>: 
80     <span property="libns:gel_cut">{{ lib.gel_cut_size }}</span>
81   <br/>
82   <b>Insert Size</b>: 
83     <span property="libns:insert_size">{{ lib.insert_size }}</span>
84   <br/>
85   <b>Background or Cell Line</b>:
86      <span property="libns:cell_line">{{ lib.cell_line }}</span>
87   <br/>
88   <b>Replicate</b>: 
89      <span property="libns:replicate">{{ lib.replicate }}</span>
90   <br/>
91   <b>Library Type</b>:
92      <span property="libns:library_type">{{ lib.library_type }}</span>
93   <br/>
94   <b>Experiment Type</b>:
95      <span property="libns:experiment_type">{{ lib.experiment_type }}</span>
96   <br/>
97   <b>Made By</b>: 
98     <span property="libns:made_by">{{ lib.made_by }}</span>
99   <br/>
100   <b>Creation Date</b>
101     <span property="libns:date" content="{{lib.creation_date|date:'Y-m-d'}}T00:00:00" datatype="xsd:dateTime">{{ lib.creation_date }}</span>
102   <br/> 
103   <b>Protocol Stopping Point</b>
104     <span property="libns:stopping_point">{{ lib.stopping_point_name }}</span>
105   <br/> 
106   <b>Affiliations</b>:
107   <ul>
108     {% for individual in lib.affiliations.all %}
109       <li property="libns:affliation" content="{{individual.name}}">
110         {{ individual.name }} ( {{ individual.contact }} )
111       </li>
112     {% endfor %}
113   </ul>
114   
115   <h2>Raw Result Files</h2>
116   <table>
117   <thead>
118     <tr>
119       <td>Run Start Date</td>
120       <td>Cycle</td>
121       <td>Flowcell</td>
122       <td>Lane</td>
123       <td>Summary</td>
124       <td>Eland</td>
125       <td>Bed</td>
126       <td>Archived</td>
127     </tr>
128   </thead>
129   <tbody>
130     {% for result in eland_results %}
131     <tr about="/flowcell/{{result.flowcell_id}}/lane/{{result.lane}}">
132       <td property="libns:date" content="{{result.run_date|date:'Y-m-d\TH:i:s'}}" datatype="xsd:dateTime">{{ result.run_date|date}}</td>
133       <td>{{ result.cycle }}</td>
134       <td property="libns:flowcell_id">{{ result.flowcell_id }}</td>
135       <td property="libns:lane">{{ result.lane }}</td>
136       <td><a href="{{ result.summary_url }}">Summary</a></td>
137       <td><a href="{{ result.result_url }}">{{ result.result_label }}</a></td>
138       <td>
139       {% if result.bed_url %}
140         <a href="{{ result.bed_url }}">Bed</a>
141       {% endif %}
142       </td>
143       <td>
144         {% if result.storage_ids %}
145           {{ result.storage_ids|safe }}
146         {% endif %}
147       </td>
148     </tr>
149     {% endfor %}
150   </tbody>
151   </table>
152   
153   <h2>Lane Summary Statistics</h2>
154   {% block summary_stats %}
155   <table>
156     <thead>
157       <tr>
158         <td colspan="7"></td>
159         <td colspan="2">No Match</td>
160         <td colspan="2">QC Failed</td>
161         <td colspan="4">Unique</td>
162         <td colspan="4">Repeat</td>
163       </tr>
164       <tr>
165       <td>Cycles</td>
166       <td>Flowcell</td>
167       <td>Lane</td>
168       <td>End</td>
169       <td>Cluster / Tile</td>
170       <td>pM</td>
171       <td>Raw Reads</td>
172       <td>total</td>
173       <td>%</td>
174       <td>total</td>
175       <td>%</td>
176       <td>0 mismatch</td>
177       <td>1 mismatch</td>
178       <td>2 mismatch</td>
179       <td>Total</td>
180       <td>0 mismatch</td>
181       <td>1 mismatch</td>
182       <td>2 mismatch</td>
183       <td>Total</td>
184       </tr>
185     </thead>
186     <tbody>
187   
188       {% for lane in lane_summary_list %}
189       <tr about="/flowcell/{{lane.flowcell_id}}/lane/{{lane.lane_id}}/end/{% if lane.end %}{{ lane.end }}{% endif %}">
190         <td>{{ lane.cycle_width }}</td>
191         <td>{{ lane.flowcell_id }}</td>
192         <td>{{ lane.lane_id }}</td>
193         <td>{% if lane.end %}{{ lane.end }}{% endif %}</td>
194         <td>{{ lane.clusters.0|intcomma }}</td>
195         <td>{{ lane.successful_pm }}</td>
196         <td>{{ lane.reads|intcomma }}</td>
197         <td>{{ lane.no_match|intcomma }}</td>
198         <td>{{ lane.no_match_percent|stringformat:".2f" }}</td>
199         <td>{{ lane.qc_failed|intcomma }}</td>
200         <td>{{ lane.qc_failed_percent|stringformat:".2f" }}</td>
201         <td>{{ lane.match_codes.U0|intcomma }}</td>
202         <td>{{ lane.match_codes.U1|intcomma }}</td>
203         <td>{{ lane.match_codes.U2|intcomma }}</td>
204         <td {% if lane.unique_reads %}property="libns:total_unique_locations" content="{{lane.unique_reads}}" datatype="xsd:decimal"{% endif %}>{{ lane.unique_reads|intcomma }}</td>
205         <td>{{ lane.match_codes.R0|intcomma }}</td>
206         <td>{{ lane.match_codes.R1|intcomma }}</td>
207         <td>{{ lane.match_codes.R2|intcomma }}</td>
208         <td>{{ lane.repeat_reads|intcomma }}</td>
209       </tr>
210       {% endfor %}
211     </tbody>
212   </table>
213
214   <h2>Flowcell Notes</h2>
215   <table>
216     <thead>
217       <tr>
218         <td>Flowcell ID</td>
219         <td>Lane</td>
220         <td>Comment</td>
221       </tr>
222     </thead>
223     <tbody>
224       {% for lane in lib.lane_set.all %}
225       <tr>
226         <td>{{ lane.flowcell.flowcell_id }}</td>
227         <td>{{ lane.lane_number }}</td>
228         <td>{{ lane.comment }}</td>
229       </tr>
230           {% endfor %}
231     </tbody>
232   </table>
233   <br/>
234   <hr/>
235   <h2>Count of multi-reads</h2>
236   {% for lane in lane_summary_list %}
237     {% if lane.summarized_reads %}
238     <h3>
239       {{lane.cycle_width}} {{ lane.flowcell_id }} lane {{ lane.lane_id }} 
240       {% if lane.end %} end {{ lane.end }}{% endif %}
241     </h3>
242     <ul>
243       {% for name, counts in lane.summarized_reads.items %}
244       <li><b>{{ name }}</b>: {{ counts|intcomma }}</li>
245       {% endfor %}
246     </ul>
247     {% endif %}
248   {% endfor %}
249   {% endblock %}
250 </div>
251 {% endblock %}