Include information about the flowcell run date on the library detail page
[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 table, div#librarydetail td {
8     border-style: solid;
9   }
10   div#librarydetail table {
11     border-width: 0 0 1px 1px;
12     border-spacing: 0;
13     border-collapse: collapse;
14   }
15   div#librarydetail td {
16     margin: 0;
17     padding: 4px;
18     border-width: 1px 1px 0 0;
19   }
20   div#librarydetail thead {
21     text-align: center;
22     }
23   div#librarydetail tbody {
24     text-align: right;
25   }
26   div#librarydetail h1,
27   div#librarydetail h2
28   {
29     font-size: 150%;
30     padding: 0.5em 0 0.5em 0;
31   }
32
33   div#librarydetail h3 {
34      font-size: 125%;
35      padding: 0 0 0.25em 2em;
36   }
37
38   div#librarydetail h4,
39   div#librarydetail h5,
40   div#librarydetail ul,
41   div#librarydetail ol,
42   div#librarydetail li
43   {
44     padding-left: 2em;
45   }
46  /* ]]> */
47 </style>
48 {% endblock %}
49
50 {% block content %}
51 <div id="librarydetail">
52   <h2>About this library</h2>
53   <b>Library ID</b>: {{ lib.id }}<br/>
54   <b>Name</b>: {{ lib.library_name }}<br/>
55   <b>Species</b>: {{ lib.library_species.scientific_name }}<br/>
56   <b>Affiliations</b>:
57   <ul>
58     {% for individual in lib.affiliations.all %}
59       <li>{{ individual.name }} ( {{ individual.contact }} )</li>
60     {% endfor %}
61   </ul>
62   
63   <h2>Raw Result Files</h2>
64   <table>
65   <thead>
66     <tr>
67       <td>Run Start Date</td>
68       <td>Cycle</td>
69       <td>Flowcell</td>
70       <td>Lane</td>
71       <td>Summary</td>
72       <td>Eland</td>
73       <td>Bed</td>
74       <td>Archived</td>
75     </tr>
76   {% for result in eland_results %}
77   <tr>
78     <td>{{ result.run_date|date }}</td>
79     <td>{{ result.cycle }}</td>
80     <td>{{ result.flowcell_id }}</td>
81     <td>{{ result.lane }}</td>
82     <td><a href="{{ result.summary_url }}">Summary</a></td>
83     <td><a href="{{ result.result_url }}">{{ result.result_label }}</a></td>
84     <td>
85     {% if result.bed_url %}
86       <a href="{{ result.bed_url }}">Bed</a>
87     {% endif %}
88     </td>
89     <td>
90       {% if result.storage_ids %}
91         {{ result.storage_ids|safe }}
92       {% endif %}
93     </td>
94   </tr>
95   {% endfor %}
96   </table>
97   
98   <h2>Lane Summary Statistics</h2>
99   {% block summary_stats %}
100   <table>
101     <thead>
102       <tr>
103         <td colspan="7"></td>
104         <td colspan="2">No Match</td>
105         <td colspan="2">QC Failed</td>
106         <td colspan="4">Unique</td>
107         <td colspan="4">Repeat</td>
108       </tr>
109       <tr>
110       <td>Cycles</td>
111       <td>Flowcell</td>
112       <td>Lane</td>
113       <td>End</td>
114       <td>Cluster / Tile</td>
115       <td>pM</td>
116       <td>Raw Reads</td>
117       <td>total</td>
118       <td>%</td>
119       <td>total</td>
120       <td>%</td>
121       <td>0 mismatch</td>
122       <td>1 mismatch</td>
123       <td>2 mismatch</td>
124       <td>Total</td>
125       <td>0 mismatch</td>
126       <td>1 mismatch</td>
127       <td>2 mismatch</td>
128       <td>Total</td>
129       </tr>
130     </thead>
131     <tbody>
132   
133       {% for lane in lane_summary_list %}
134       <tr>
135         <td>{{ lane.cycle_width }}</td>
136         <td>{{ lane.flowcell_id }}</td>
137         <td>{{ lane.lane_id }}</td>
138         <td>{% if lane.end %}{{ lane.end }}{% endif %}</td>
139         <td>{{ lane.clusters.0|intcomma }}</td>
140         <td>{{ lane.successful_pm }}</td>
141         <td>{{ lane.reads|intcomma }}</td>
142         <td>{{ lane.no_match|intcomma }}</td>
143         <td>{{ lane.no_match_percent|stringformat:".2f" }}</td>
144         <td>{{ lane.qc_failed|intcomma }}</td>
145         <td>{{ lane.qc_failed_percent|stringformat:".2f" }}</td>
146         <td>{{ lane.match_codes.U0|intcomma }}</td>
147         <td>{{ lane.match_codes.U1|intcomma }}</td>
148         <td>{{ lane.match_codes.U2|intcomma }}</td>
149         <td>{{ lane.unique_reads|intcomma }}</td>
150         <td>{{ lane.match_codes.R0|intcomma }}</td>
151         <td>{{ lane.match_codes.R1|intcomma }}</td>
152         <td>{{ lane.match_codes.R2|intcomma }}</td>
153         <td>{{ lane.repeat_reads|intcomma }}</td>
154       </tr>
155       {% endfor %}
156     </tbody>
157   </table>
158   <br/>
159   <hr/>
160   <h2>Count of multi-reads</h2>
161   {% for lane in lane_summary_list %}
162     {% if lane.summarized_reads %}
163     <h3>
164       {{lane.cycle_width}} {{ lane.flowcell_id }} lane {{ lane.lane_id }} 
165       {% if lane.end %} end {{ lane.end }}{% endif %}
166     </h3>
167     <ul>
168       {% for name, counts in lane.summarized_reads.items %}
169       <li><b>{{ name }}</b>: {{ counts|intcomma }}</li>
170       {% endfor %}
171     </ul>
172     {% endif %}
173   {% endfor %}
174   {% endblock %}
175 </div>
176 {% endblock %}