947691c5050deeebaf1c1c53af652b96c135af5b
[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   /* ]]> */
27 </style>
28 {% endblock %}
29
30 {% block content %}
31 <div id="librarydetail">
32   <h2>About this library</h2>
33   <b>Library ID</b>: {{ lib.id }}<br/>
34   <b>Name</b>: {{ lib.library_name }}<br/>
35   <b>Species</b>: {{ lib.library_species.scientific_name }}<br/>
36   <b>Affiliations</b>:
37   <ul>
38     {% for individual in lib.affiliations.all %}
39       <li>{{ individual.name }} ( {{ individual.contact }} )</li>
40     {% endfor %}
41   </ul>
42   
43   <h2>Raw Result Files</h2>
44   <table>
45   <thead>
46     <tr>
47       <td>Cycle</td>
48       <td>Flowcell</td>
49       <td>Lane</td>
50       <td>Summary</td>
51       <td>Eland</td>
52       <td>Bed</td>
53       <td>Archived</td>
54     </tr>
55   {% for result in eland_results %}
56   <tr>
57     <td>{{ result.cycle }}</td>
58     <td>{{ result.flowcell_id }}</td>
59     <td>{{ result.lane }}</td>
60     <td><a href="{{ result.summary_url }}">Summary</a></td>
61     <td><a href="{{ result.result_url }}">{{ result.result_label }}</a></td>
62     <td>
63     {% if result.bed_url %}
64       <a href="{{ result.bed_url }}">Bed</a>
65     {% endif %}
66     </td>
67     <td>
68       {% if result.storage_ids %}
69         {{ result.storage_ids|safe }}
70       {% endif %}
71     </td>
72   </tr>
73   {% endfor %}
74   </table>
75   
76   <h2>Lane Summary Statistics</h2>
77   {% block summary_stats %}
78   <table>
79     <thead>
80       <tr>
81         <td colspan="7"></td>
82         <td colspan="2">No Match</td>
83         <td colspan="2">QC Failed</td>
84         <td colspan="4">Unique</td>
85         <td colspan="4">Repeat</td>
86       </tr>
87       <tr>
88       <td>Cycles</td>
89       <td>Flowcell</td>
90       <td>Lane</td>
91       <td>End</td>
92       <td>Cluster / Tile</td>
93       <td>pM</td>
94       <td>Raw Reads</td>
95       <td>total</td>
96       <td>%</td>
97       <td>total</td>
98       <td>%</td>
99       <td>0 mismatch</td>
100       <td>1 mismatch</td>
101       <td>2 mismatch</td>
102       <td>Total</td>
103       <td>0 mismatch</td>
104       <td>1 mismatch</td>
105       <td>2 mismatch</td>
106       <td>Total</td>
107       </tr>
108     </thead>
109     <tbody>
110   
111       {% for lane in lane_summary_list %}
112       <tr>
113         <td>{{ lane.cycle_width }}</td>
114         <td>{{ lane.flowcell_id }}</td>
115         <td>{{ lane.lane_id }}</td>
116         <td>{% if lane.end %}{{ lane.end }}{% endif %}</td>
117         <td>{{ lane.clusters.0|intcomma }}</td>
118         <td>{{ lane.successful_pm }}</td>
119         <td>{{ lane.reads|intcomma }}</td>
120         <td>{{ lane.no_match|intcomma }}</td>
121         <td>{{ lane.no_match_percent|stringformat:".2f" }}</td>
122         <td>{{ lane.qc_failed|intcomma }}</td>
123         <td>{{ lane.qc_failed_percent|stringformat:".2f" }}</td>
124         <td>{{ lane.match_codes.U0|intcomma }}</td>
125         <td>{{ lane.match_codes.U1|intcomma }}</td>
126         <td>{{ lane.match_codes.U2|intcomma }}</td>
127         <td>{{ lane.unique_reads|intcomma }}</td>
128         <td>{{ lane.match_codes.R0|intcomma }}</td>
129         <td>{{ lane.match_codes.R1|intcomma }}</td>
130         <td>{{ lane.match_codes.R2|intcomma }}</td>
131         <td>{{ lane.repeat_reads|intcomma }}</td>
132       </tr>
133       {% endfor %}
134     </tbody>
135   </table>
136   <br/>
137   <hr/>
138   <h2>Count of multi-reads</h2>
139   {% for lane in lane_summary_list %}
140     {% if lane.summarized_reads %}
141     <h3>
142       {{lane.cycle_width}} {{ lane.flowcell_id }} lane {{ lane.lane_id }} 
143       {% if lane.end %} end {{ lane.end }}{% endif %}
144     </h3>
145     <ul>
146       {% for name, counts in lane.summarized_reads.items %}
147       <li><b>{{ name }}</b>: {{ counts|intcomma }}</li>
148       {% endfor %}
149     </ul>
150     {% endif %}
151   {% endfor %}
152   {% endblock %}
153 </div>
154 {% endblock %}