-
Notifications
You must be signed in to change notification settings - Fork 10
/
metaReport.xsl
482 lines (432 loc) · 16.3 KB
/
metaReport.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" doctype-system="http://www.w3.org/TR/html4/strict.dtd" doctype-public="-//W3C//DTD HTML 4.01//EN" indent="yes" />
<xsl:template name="RepeatString">
<xsl:param name="string" select="''" />
<xsl:param name="times" select="1" />
<xsl:if test="number($times) > 0">
<xsl:value-of select="$string" />
<xsl:call-template name="RepeatString">
<xsl:with-param name="string" select="$string" />
<xsl:with-param name="times" select="$times - 1" />
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="format-suffix">
<xsl:param name="myval" />
<xsl:param name="precision" />
<xsl:variable name="zeroes">
<xsl:call-template name="RepeatString">
<xsl:with-param name="string" select="0" />
<xsl:with-param name="times" select="$precision" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="dval" select="concat(1,$zeroes)" />
<xsl:choose>
<xsl:when test="$myval > 1000000000">
<xsl:value-of select="format-number(round($myval div (1000000000 div $dval)) div $dval, concat('#.',$zeroes))" />
<xsl:text>G</xsl:text>
</xsl:when>
<xsl:when test="$myval > 1000000">
<xsl:value-of select="format-number(round($myval div (1000000 div $dval)) div $dval, concat('#.',$zeroes))" />
<xsl:text>M</xsl:text>
</xsl:when>
<xsl:when test="$myval > 1000">
<xsl:value-of select="format-number(round($myval div (1000 div $dval)) div $dval, concat('#.',$zeroes))" />
<xsl:text>k</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$myval" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="/SequencingReport">
<html>
<head>
<title> Sequencing results - <xsl:value-of select="MetaData/Project"/></title>
<style type="text/css">
body {font:12px arial,sans-serif; background:#ffffff}
h1 {text-align: left; padding: 5px; font-weight:bold; font-size:150%;}
h2 {text-align: left; padding: 5px; font-weight:bold; font-size:120%;}
hr {color:sienna;}
p {margin-left:20px; width: 80em;}
tr.even { background: #bbbbbb; }
tr.odd { background: #dddddd; }
thead { background: #eeeeee; }
div.section {display: inline-block; background: #eeeeee; margin-bottom: 20px; margin-right: 20px;}
table th { padding: 1px 10px;}
table td { padding: 1px 10px;}
table td { text-align: center;}
table td.SampleName { text-align: left; padding: 5px; font-weight:bold; font-size:100%;}
span.stddev {font-size:75%;}
table.MetaData th { text-align: left; padding: 5px; font-weight:bold; font-size:100%;}
table.MetaData td { text-align: left; padding: 5px; font-size:75%; background:#dddddd}
table.key th { text-align: left; padding: 5px; font-size:75%;}
table.key td { text-align: left; padding: 5px; font-size:75%; background:#dddddd}
</style>
</head>
<body>
<h1>Sequencing results for <xsl:value-of select="MetaData/Project"/></h1>
<br />
<div>
<div class="section">
<h2>Metrics aggregated per lane</h2>
<table>
<thead>
<tr>
<th>Flowcell</th>
<th>Lane</th>
<th>Raw Density<br/>clusters/mm<sup>2</sup></th>
<th>Pass<br/>Filter(%)</th>
<th>Clusters<br/>PF</th>
<th>Read</th>
<th>Yield<br/>PF (bp)</th>
<th>Q≥30(%)</th>
<th>Yield<br/>Q≥30 (bp)</th>
<th>MeanQ</th>
<th>PhiX<br/>Error</th>
<th>Q-score<br/>distribution</th>
<th>Base<br/>composition</th>
<th>GC<br/>distribution</th>
<th>Contiguous Length<br/>with Q≥30 (bp)</th>
<th>Duplicates</th>
<th>Adapter<br/>sequences</th>
</tr>
</thead>
<tbody>
<xsl:for-each select="LaneMetrics/Lane">
<xsl:sort select="@Id"/>
<xsl:variable name="row-class">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
<xsl:otherwise>odd</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="LaneRows">
<xsl:value-of select="count(descendant::Read)"/>
</xsl:variable>
<xsl:for-each select="./Read">
<tr class="{$row-class}">
<xsl:if test="count(preceding-sibling::Read) = 0">
<td rowspan="{$LaneRows}"><xsl:value-of select="../@fcid"/></td>
<td rowspan="{$LaneRows}"><xsl:value-of select="../@Num"/></td>
<td rowspan="{$LaneRows}">
<xsl:call-template name="format-suffix">
<xsl:with-param name="myval" select="@DensityRaw" />
<xsl:with-param name="precision" select="1" />
</xsl:call-template>
</td>
<td rowspan="{$LaneRows}"><xsl:value-of select="@PctPF"/></td>
<td rowspan="{$LaneRows}">
<xsl:call-template name="format-suffix">
<xsl:with-param name="myval" select="@PF" />
<xsl:with-param name="precision" select="1" />
</xsl:call-template>
</td>
</xsl:if>
<td><xsl:value-of select="@Id"/></td>
<td>
<xsl:call-template name="format-suffix">
<xsl:with-param name="myval" select="@YieldPF" />
<xsl:with-param name="precision" select="1" />
</xsl:call-template>
</td>
<td><xsl:value-of select="format-number(round((@YieldQ30 * 1000) div @YieldPF) div 10, '##.0')"/></td>
<td>
<xsl:call-template name="format-suffix">
<xsl:with-param name="myval" select="@YieldQ30" />
<xsl:with-param name="precision" select="1" />
</xsl:call-template>
</td>
<td><xsl:value-of select="@QMean"/><span class="stddev">±<xsl:value-of select="@QStdDev"/></span></td>
<td><xsl:value-of select="@ErrRate"/><span class="stddev">±<xsl:value-of select="@ErrRateSD"/></span></td>
<xsl:choose>
<xsl:when test="@QscorePlot = 'NA'">
<td>NA</td>
</xsl:when>
<xsl:otherwise>
<td><a href="{concat('./',@QscorePlot)}"><img alt="Qscore Plot" src="{concat('./',@QscorePlotThumb)}"/></a></td>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="@BaseCompPlot = 'NA'">
<td>NA</td>
</xsl:when>
<xsl:otherwise>
<td><a href="{concat('./',@BaseCompPlot)}"><img alt="Base Composition Plot" src="{concat('./',@BaseCompPlotThumb)}"/></a></td>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="@GCPlot = 'NA'">
<td>NA</td>
</xsl:when>
<xsl:otherwise>
<td><a href="{concat('./',@GCPlot)}"><img alt="GC Plot" src="{concat('./',@GCPlotThumb)}"/></a></td>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="@Q30Plot = 'NA'">
<td>NA</td>
</xsl:when>
<xsl:otherwise>
<td><a href="{concat('./',@Q30Plot)}"><img alt="Q30Length Plot" src="{concat('./',@Q30PlotThumb)}"/></a></td>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="@DupPlot = 'NA'">
<td>NA</td>
</xsl:when>
<xsl:otherwise>
<td><a href="{concat('./',@DupPlot)}"><img alt="Duplication Plot" src="{concat('./',@DupPlotThumb)}"/></a></td>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="@AdapterPlot = 'NA'">
<td>NA</td>
</xsl:when>
<xsl:otherwise>
<td><a href="{concat('./',@AdapterPlot)}"><img alt="Adapter Plot" src="{concat('./',@AdapterPlotThumb)}"/></a></td>
</xsl:otherwise>
</xsl:choose>
</tr>
</xsl:for-each>
</xsl:for-each>
</tbody>
</table>
</div>
</div>
<div>
<div class="section">
<h2>Metrics per sample</h2>
<table>
<thead>
<tr>
<th>Flowcell</th>
<th>Lane</th>
<th>Tag</th>
<th>Library</th>
<th>Insert<br/>size(bp)</th>
<th>Fraction<br/>of lane(%)</th>
<th>Clusters<br/>PF</th>
<th>Tags with<br/>error(%)</th>
<th>Read</th>
<th>Yield<br/>PF (bp)</th>
<th>Q≥30(%)</th>
<th>Yield<br/>Q≥30 (bp)</th>
<th>MeanQ</th>
<th>Q-score<br/>distribution</th>
<th>Base<br/>composition</th>
<th>GC<br/>distribution</th>
<th>Contiguous Length<br/>with Q≥30 (bp)</th>
<th>Duplicates</th>
<th>Adapter<br/>sequences</th>
</tr>
</thead>
<tbody>
<xsl:for-each select="SampleMetrics/Sample">
<xsl:sort select="@Id"/>
<xsl:variable name="row-class">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
<xsl:otherwise>odd</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr class="{$row-class}">
<td colspan="19" class="SampleName"><xsl:value-of select="@Id"/></td>
</tr>
<xsl:for-each select="./Lane">
<xsl:sort select="@Id"/>
<xsl:variable name="LaneRows">
<xsl:value-of select="count(descendant::Read)"/>
</xsl:variable>
<xsl:for-each select="./Read">
<tr class="{$row-class}">
<xsl:if test="count(preceding-sibling::Read) = 0">
<td rowspan="{$LaneRows}"><xsl:value-of select="../@fcid"/></td>
<td rowspan="{$LaneRows}"><xsl:value-of select="../@Num"/></td>
<td rowspan="{$LaneRows}"><xsl:value-of select="../@Tag"/></td>
<td rowspan="{$LaneRows}"><xsl:value-of select="@LibraryName"/></td>
<td rowspan="{$LaneRows}">
<xsl:if test="not(@FragmentLower='') and not(@FragmentUpper='')">
<xsl:value-of select="concat(@FragmentSize,' (',@FragmentLower, '-', @FragmentUpper, ')')"/>
</xsl:if>
<xsl:if test="@FragmentLower='' or @FragmentUpper=''">
<xsl:value-of select="@FragmentSize"/>
</xsl:if>
</td>
<td rowspan="{$LaneRows}"><xsl:value-of select="round(100*@PctLane) div 100"/></td>
<td rowspan="{$LaneRows}">
<xsl:call-template name="format-suffix">
<xsl:with-param name="myval" select="@PF" />
<xsl:with-param name="precision" select="1" />
</xsl:call-template>
</td>
<td rowspan="{$LaneRows}"><xsl:value-of select="round(100*@TagErr) div 100"/></td>
</xsl:if>
<td><xsl:value-of select="@Id"/></td>
<td>
<xsl:call-template name="format-suffix">
<xsl:with-param name="myval" select="@YieldPF" />
<xsl:with-param name="precision" select="1" />
</xsl:call-template>
</td>
<td><xsl:value-of select="format-number(round((@YieldQ30 * 1000) div @YieldPF) div 10, '##.0')"/></td>
<td>
<xsl:call-template name="format-suffix">
<xsl:with-param name="myval" select="@YieldQ30" />
<xsl:with-param name="precision" select="1" />
</xsl:call-template>
</td>
<td><xsl:value-of select="@QMean"/><span class="stddev">±<xsl:value-of select="@QStdDev"/></span></td>
<xsl:choose>
<xsl:when test="@QscorePlot = 'NA'">
<td>NA</td>
</xsl:when>
<xsl:otherwise>
<td><a href="{concat('./',@QscorePlot)}"><img alt="Qscore Plot" src="{concat('./',@QscorePlotThumb)}"/></a></td>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="@BaseCompPlot = 'NA'">
<td>NA</td>
</xsl:when>
<xsl:otherwise>
<td><a href="{concat('./',@BaseCompPlot)}"><img alt="Base Composition Plot" src="{concat('./',@BaseCompPlotThumb)}"/></a></td>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="@GCPlot = 'NA'">
<td>NA</td>
</xsl:when>
<xsl:otherwise>
<td><a href="{concat('./',@GCPlot)}"><img alt="GC Plot" src="{concat('./',@GCPlotThumb)}"/></a></td>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="@Q30Plot = 'NA'">
<td>NA</td>
</xsl:when>
<xsl:otherwise>
<td><a href="{concat('./',@Q30Plot)}"><img alt="Q30Length Plot" src="{concat('./',@Q30PlotThumb)}"/></a></td>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="@DupPlot = 'NA'">
<td>NA</td>
</xsl:when>
<xsl:otherwise>
<td><a href="{concat('./',@DupPlot)}"><img alt="Duplication Plot" src="{concat('./',@DupPlotThumb)}"/></a></td>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="@AdapterPlot = 'NA'">
<td>NA</td>
</xsl:when>
<xsl:otherwise>
<td><a href="{concat('./',@AdapterPlot)}"><img alt="Adapter Plot" src="{concat('./',@AdapterPlotThumb)}"/></a></td>
</xsl:otherwise>
</xsl:choose>
</tr>
</xsl:for-each>
</xsl:for-each>
</xsl:for-each>
</tbody>
</table>
</div>
</div>
<div class="section">
<h2>Table key</h2>
<table class="key">
<tr>
<td>Raw Density</td>
<td>Average number of clusters per square mm</td>
</tr>
<tr>
<td>Pass Filter</td>
<td>Fraction of sequences that passed Illumina's chastity filter. Only the sequences that passed the filter are reported</td>
</tr>
<tr>
<td>Yield PF</td>
<td>Total number of bases from pass filter reads</td>
</tr>
<tr>
<td>Clusters PF</td>
<td>Number of clusters (sequences) pass filter</td>
</tr>
<tr>
<td>Q≥30</td>
<td>Fraction of all pass filter bases with Q-score ≥30</td>
</tr>
<tr>
<td>Yield Q≥30</td>
<td>Number of bases with Q-score ≥30</td>
</tr>
<tr>
<td>MeanQ</td>
<td>Mean Q-score over all sequences (±Standard deviation)</td>
</tr>
<tr>
<td>PhiX Error</td>
<td>Fraction of mismatch bases in the spike in phage PhiX control sequences (±Standard deviation)</td>
</tr>
<tr>
<td>Tag</td>
<td>The index tag used to identify the sample</td>
</tr>
<tr>
<td>Library</td>
<td>Name of sequencing library</td>
</tr>
<tr>
<td>Insert size</td>
<td>Size of sequenced fragments (excluding adaptors) from bioanalyzer. Peak and range.</td>
</tr>
<tr>
<td>Fraction of lane</td>
<td>Yield for sample compared to the total yield of the lane in which it was sequenced</td>
</tr>
<tr>
<td>Tags with error</td>
<td>Fraction of sequences identified as belonging to the sample containing an error in the tag sequence.(As the tags differ with at least two bases, an error of one base is tolerated in demultiplexing.)</td>
</tr>
<tr>
<td>Q-score distribution</td>
<td>A plot showing the distribution of Q-scores per cycle</td>
</tr>
<tr>
<td>Base composition</td>
<td>Plot on the relative fraction of each base per cycle</td>
</tr>
<tr>
<td>GC distribution</td>
<td>Distribution of GC-content in the sequenced fragments</td>
</tr>
<tr>
<td>Contiguous Length with Q≥30</td>
<td>Plot on the length distribution of the longest contiguous stretch of bases with Q-score < 30</td>
</tr>
<tr>
<td>Duplicates</td>
<td>Frequency of duplicated sequences. The numbers are estimated by following the first 100,000 unique sequences through the whole file.
Identity is based on the first 50 bases.</td>
</tr>
<tr>
<td>Adapter sequences</td>
<td>Cumulative fraction of sequences matching the adapter sequence, starting at cycle X. The match must be at least 6 bases, have at most 1 mismatch per 10 bases and extend to the end of the read or adapter sequence.</td>
</tr>
</table>
</div>
<div>
<div class="section">
<h2>Files</h2>
<p><!--Bam-files were generated by mapping the reads to GRCh37 (Download from Ensembl v57) with bwa 0.6.2 using default parameters. The resulting bam files where merged to one file per sample with Picard and all reads are marked with read group information containing flowcell id, library id and lane so that reads from different runs can be sorted out if needed.--></p>
<p>The directory Plots contains the plots and the underlying data and gnuplot scripts for the plots presented on this page. The plots are divided into one directory per sample plus one directory for lane aggregate plots. The files are named according to Tag-Lane-Read-PlotType*.</p>
<p>report.xml contains these numbers presented in here in xml format</p>
<p>report.xsl is the template used for displaying the data in the xml file as you see it now</p>
<p>report.html is the result of applying the xsl document to the xml data, and is probably the file you opened in your browser</p>
</div>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>