Add pages to show information about a particular flowcell.
[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 {% endblock %}
12
13 {% block content %}
14 <div id="library_detail">
15   <h2>About this library</h2>
16   <b>Library ID</b>: {{ lib.id }}<br/>
17   <b>Name</b>: 
18     <span property="libns:name">{{ lib.library_name }}</span>
19   <br/>
20   <b>Species</b>: 
21     <a href="{{lib.library_species.get_absolute_url}}" rel="libns:species">
22     <span property="libns:species_name">{{ lib.library_species.scientific_name }}</span></a>
23   <br/>
24   <b>Concentration</b>: 
25     <span property="libns:concentration">{{ lib.undiluted_concentration }} ng/µl</span>
26   <br/>
27   <b>Gel Cut Size</b>: 
28     <span property="libns:gel_cut">{{ lib.gel_cut_size }}</span>
29   <br/>
30   <b>Insert Size</b>: 
31     <span property="libns:insert_size">{{ lib.insert_size }}</span>
32   <br/>
33   <b>Background or Cell Line</b>:
34      <span property="libns:cell_line">{{ lib.cell_line }}</span>
35   <br/>
36   <b>Replicate</b>: 
37      <span property="libns:replicate">{{ lib.replicate }}</span>
38   <br/>
39   <b>Library Type</b>:
40      <span property="libns:library_type">{{ lib.library_type }}</span>
41   <br/>
42   <b>Experiment Type</b>:
43      <span property="libns:experiment_type">{{ lib.experiment_type }}</span>
44   <br/>
45   <b>Made By</b>: 
46     <span property="libns:made_by">{{ lib.made_by }}</span>
47   <br/>
48   <b>Creation Date</b>
49     <span property="libns:date" content="{{lib.creation_date|date:'Y-m-d'}}T00:00:00" datatype="xsd:dateTime">{{ lib.creation_date }}</span>
50   <br/> 
51   <b>Protocol Stopping Point</b>
52     <span property="libns:stopping_point">{{ lib.stopping_point_name }}</span>
53   <br/> 
54   <b>Affiliations</b>:
55   <ul>
56     {% for individual in lib.affiliations.all %}
57       <li property="libns:affliation" content="{{individual.name}}">
58         {{ individual.name }} ( {{ individual.contact }} )
59       </li>
60     {% endfor %}
61   </ul>
62   <div class="htswdetail">
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   </thead>
77   <tbody>
78     {% for result in eland_results %}
79     <tr about="{{result.flowcell.get_absolute_url}}">
80       <td property="libns:date" content="{{result.run_date|date:'Y-m-d\TH:i:s'}}" datatype="xsd:dateTime">{{ result.run_date|date}}</td>
81       <td>{{ result.cycle }}</td>
82       <td><a href="{{result.flowcell.get_absolute_url}}"><span property="libns:flowcell_id">{{ result.flowcell_id }}</span></a></td>
83       <td><a href="{{result.lane.get_absolute_url}}" rel="libns:has_lane"><span property="libns:lane_number" datatype="xsd:decimal">{{ result.lane.lane_number }}</span></a></td>
84       <td><a href="{{ result.summary_url }}">Summary</a></td>
85       <td><a href="{{ result.result_url }}">{{ result.result_label }}</a></td>
86       <td>
87       {% if result.bed_url %}
88         <a href="{{ result.bed_url }}">Bed</a>
89       {% endif %}
90       </td>
91       <td>
92         {% if result.storage_ids %}
93           {{ result.storage_ids|safe }}
94         {% endif %}
95       </td>
96     </tr>
97     {% endfor %}
98   </tbody>
99   </table>
100   
101   <h2>Lane Summary Statistics</h2>
102   {% block summary_stats %}
103   <table>
104     <thead>
105       <tr>
106         <td colspan="7"></td>
107         <td colspan="2">No Match</td>
108         <td colspan="2">QC Failed</td>
109         <td colspan="4">Unique</td>
110         <td colspan="4">Repeat</td>
111       </tr>
112       <tr>
113       <td>Cycles</td>
114       <td>Flowcell</td>
115       <td>Lane</td>
116       <td>End</td>
117       <td>Cluster / Tile</td>
118       <td>pM</td>
119       <td>Raw Reads</td>
120       <td>total</td>
121       <td>%</td>
122       <td>total</td>
123       <td>%</td>
124       <td>0 mismatch</td>
125       <td>1 mismatch</td>
126       <td>2 mismatch</td>
127       <td>Total</td>
128       <td>0 mismatch</td>
129       <td>1 mismatch</td>
130       <td>2 mismatch</td>
131       <td>Total</td>
132       </tr>
133     </thead>
134     <tbody>
135   
136       {% for lane in lane_summary_list %}
137       <tr about="/flowcell/{{lane.flowcell_id}}/{{lane.lane_id}}/{% if lane.end %}#end{{ lane.end }}{% endif %}">
138         <td>{{ lane.cycle_width }}</td>
139         <td>{{ lane.flowcell_id }}</td>
140         <td>{{ lane.lane_id }}</td>
141         <td>{% if lane.end %}{{ lane.end }}{% endif %}</td>
142         <td>{{ lane.clusters.0|intcomma }}</td>
143         <td>{{ lane.successful_pm }}</td>
144         <td>{{ lane.reads|intcomma }}</td>
145         <td>{{ lane.no_match|intcomma }}</td>
146         <td>{{ lane.no_match_percent|stringformat:".2f" }}</td>
147         <td>{{ lane.qc_failed|intcomma }}</td>
148         <td>{{ lane.qc_failed_percent|stringformat:".2f" }}</td>
149         <td>{{ lane.match_codes.U0|intcomma }}</td>
150         <td>{{ lane.match_codes.U1|intcomma }}</td>
151         <td>{{ lane.match_codes.U2|intcomma }}</td>
152         <td {% if lane.unique_reads %}property="libns:total_unique_locations" content="{{lane.unique_reads}}" datatype="xsd:decimal"{% endif %}>{{ lane.unique_reads|intcomma }}</td>
153         <td>{{ lane.match_codes.R0|intcomma }}</td>
154         <td>{{ lane.match_codes.R1|intcomma }}</td>
155         <td>{{ lane.match_codes.R2|intcomma }}</td>
156         <td>{{ lane.repeat_reads|intcomma }}</td>
157       </tr>
158       {% endfor %}
159     </tbody>
160   </table>
161
162   <h2>Flowcell Notes</h2>
163   <table>
164     <thead>
165       <tr>
166         <td>Flowcell ID</td>
167         <td>Lane</td>
168         <td>Comment</td>
169       </tr>
170     </thead>
171     <tbody>
172       {% for lane in lib.lane_set.all %}
173       <tr rel="libns:has_lane" resource="{{lane.get_absolute_url}}">
174         <td><a href="{{lane.flowcell.get_absolute_url}}" rel="libns:flowcell">
175             <span property="libns:flowcell_id">{{ lane.flowcell.flowcell_id }}</span></a></td>
176         <td><a href="{{lane.get_absolute_url}}"> 
177             <span property="libns:lane_number"  datatype="xsd:decimal"
178                >{{ lane.lane_number }}</span></a></td>
179         <td>{{ lane.comment }}</td>
180       </tr>
181           {% endfor %}
182     </tbody>
183   </table>
184   {% endblock %}
185   </div>
186 </div>
187 {% endblock %}