Override extjs's rather harsh stylesheet so the library detail page is legible
[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>Cycle</td>
68       <td>Flowcell</td>
69       <td>Lane</td>
70       <td>Summary</td>
71       <td>Eland</td>
72       <td>Bed</td>
73       <td>Archived</td>
74     </tr>
75   {% for result in eland_results %}
76   <tr>
77     <td>{{ result.cycle }}</td>
78     <td>{{ result.flowcell_id }}</td>
79     <td>{{ result.lane }}</td>
80     <td><a href="{{ result.summary_url }}">Summary</a></td>
81     <td><a href="{{ result.result_url }}">{{ result.result_label }}</a></td>
82     <td>
83     {% if result.bed_url %}
84       <a href="{{ result.bed_url }}">Bed</a>
85     {% endif %}
86     </td>
87     <td>
88       {% if result.storage_ids %}
89         {{ result.storage_ids|safe }}
90       {% endif %}
91     </td>
92   </tr>
93   {% endfor %}
94   </table>
95   
96   <h2>Lane Summary Statistics</h2>
97   {% block summary_stats %}
98   <table>
99     <thead>
100       <tr>
101         <td colspan="7"></td>
102         <td colspan="2">No Match</td>
103         <td colspan="2">QC Failed</td>
104         <td colspan="4">Unique</td>
105         <td colspan="4">Repeat</td>
106       </tr>
107       <tr>
108       <td>Cycles</td>
109       <td>Flowcell</td>
110       <td>Lane</td>
111       <td>End</td>
112       <td>Cluster / Tile</td>
113       <td>pM</td>
114       <td>Raw Reads</td>
115       <td>total</td>
116       <td>%</td>
117       <td>total</td>
118       <td>%</td>
119       <td>0 mismatch</td>
120       <td>1 mismatch</td>
121       <td>2 mismatch</td>
122       <td>Total</td>
123       <td>0 mismatch</td>
124       <td>1 mismatch</td>
125       <td>2 mismatch</td>
126       <td>Total</td>
127       </tr>
128     </thead>
129     <tbody>
130   
131       {% for lane in lane_summary_list %}
132       <tr>
133         <td>{{ lane.cycle_width }}</td>
134         <td>{{ lane.flowcell_id }}</td>
135         <td>{{ lane.lane_id }}</td>
136         <td>{% if lane.end %}{{ lane.end }}{% endif %}</td>
137         <td>{{ lane.clusters.0|intcomma }}</td>
138         <td>{{ lane.successful_pm }}</td>
139         <td>{{ lane.reads|intcomma }}</td>
140         <td>{{ lane.no_match|intcomma }}</td>
141         <td>{{ lane.no_match_percent|stringformat:".2f" }}</td>
142         <td>{{ lane.qc_failed|intcomma }}</td>
143         <td>{{ lane.qc_failed_percent|stringformat:".2f" }}</td>
144         <td>{{ lane.match_codes.U0|intcomma }}</td>
145         <td>{{ lane.match_codes.U1|intcomma }}</td>
146         <td>{{ lane.match_codes.U2|intcomma }}</td>
147         <td>{{ lane.unique_reads|intcomma }}</td>
148         <td>{{ lane.match_codes.R0|intcomma }}</td>
149         <td>{{ lane.match_codes.R1|intcomma }}</td>
150         <td>{{ lane.match_codes.R2|intcomma }}</td>
151         <td>{{ lane.repeat_reads|intcomma }}</td>
152       </tr>
153       {% endfor %}
154     </tbody>
155   </table>
156   <br/>
157   <hr/>
158   <h2>Count of multi-reads</h2>
159   {% for lane in lane_summary_list %}
160     {% if lane.summarized_reads %}
161     <h3>
162       {{lane.cycle_width}} {{ lane.flowcell_id }} lane {{ lane.lane_id }} 
163       {% if lane.end %} end {{ lane.end }}{% endif %}
164     </h3>
165     <ul>
166       {% for name, counts in lane.summarized_reads.items %}
167       <li><b>{{ name }}</b>: {{ counts|intcomma }}</li>
168       {% endfor %}
169     </ul>
170     {% endif %}
171   {% endfor %}
172   {% endblock %}
173 </div>
174 {% endblock %}