File: batch_report.html

package info (click to toggle)
qcumber 2.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,276 kB
  • sloc: python: 3,097; sh: 153; makefile: 18
file content (506 lines) | stat: -rwxr-xr-x 23,760 bytes parent folder | download
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
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>QCumber Batch Report</title>
    <script src="/usr/share/javascript/jquery/jquery.min.js"></script>
    <script src="/usr/share/javascript/angular.js/angular.min.js"></script>
    <script type="text/javascript" src="/usr/share/javascript/bootstrap/js/bootstrap.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/usr/share/javascript/bootstrap/css/bootstrap.css.map">
    <link rel="stylesheet" type="text/css" href="/usr/share/javascript/bootstrap/css/bootstrap-theme.css.map">
    <style>
        .row_hidden {
            display: none;
        }

        .panel {
            background-color: #F7F7F7;

        }

        .panel-heading {
            cursor: pointer;
        }

        .show_row {
            display: show;
        }

        p.inbox_text {
            text-align: center;
            color: grey;
            margin: 0 0 0px;
        }

        .thumbnail {
            margin: 5px;
            border: 0px solid #000;
            height: 150px;
            width: 200px;
            border-radius: 3px;
        }

        .sample_box {
            display: table-cell;
            margin: 10px;
            padding: 10px;
            color: lightgrey;
            border-radius: 5px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
        }

        .sidebar {

            overflow-y: auto;
            position: fixed;
            height: 100%;
            top: 50px;
            z-index: 999;
            padding-right: 0px;
            box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.12);
            background: #f7f7f7;
        }

        .navbar-default {
            background-image: linear-gradient(to bottom, #1D95B6 0px, #0C6A89 100%);
        }

        .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .open > a {
            background-image: linear-gradient(to bottom, rgb(32, 162, 198) 0px, rgb(21, 117, 149) 100%);

        }

        .navbar-default .navbar-brand {
            color: white;
        }

        h4 {
            color: #0A6780;
        }

        h5 {
            color: #0D7793;
        }

        .link {
            fill: none;
            stroke: #ccc;
            stroke-width: 1.5px;
        }

        .table {
            margin-bottom: auto;
        }

    </style>
    <script>

        var myApp = angular.module('BatchReport', []);
        myApp.controller('SummaryTable', function ($scope, $http) {
                    // create a projects Object
                    $scope.projects = {};
                    // pretend data we just got back from the server
                    // this is an ARRAY of OBJECTS

                    // TODO insert data here

                    $scope.show_summary = {};
                    $scope.show_img = {};
                    $scope.show_raw_data = true;


                    $scope.information = {{~ general_information ~}};
                    $scope.projects.samples = {{~ summary ~}};
                    $scope.projects.summary_img = {{~ summary_img ~}};
                    $scope.sequencer_information = {{~ sav ~}};

                    $scope.isArray = angular.isArray;
                    $scope.isString = angular.isString;
                    $scope.selected = {title: "", img: "", caption: ""};
                }
        );

        myApp.filter('imgFilter', function () {
            return function (input, filter) {
                var result = [];
                angular.forEach(input, function (input) {
                    angular.forEach(filter, function (isfiltered, name) {
                        if (isfiltered && name === input.name) {
                            result.push(input);
                        }
                    });
                });
                return result;
            };
        });
        myApp.filter('typeFilter', function () {
            return function (input, filter) {
                var result = [];
                angular.forEach(input, function (input) {
                    angular.forEach(filter, function (isfiltered, Name) {

                        if (isfiltered && Name === input.Name) {
                            result.push(input);

                        }
                    });
                });
                return result;
            };
        });


    </script>

</head>
<body>
<div ng-app="BatchReport">


    <!-- Summary Table Controller-->
    <div ng-controller="SummaryTable">
        <!-- head Quality Control-->
        <nav class="navbar navbar-default navbar-fixed-top">
            <div class="container-fluid">
                <div class="navbar-header">
                    <a class="navbar-brand" href="#">QCumber</a>
                </div>
                <ul class="nav navbar-nav">

                    <li><a href="#sequencer_information" style="color: aliceblue;" data-toggle="tab"
                           ng-if="sequencer_information!=''">Sequencer Information</a></li>
                    <li class="active"><a href="#summary" style="color: aliceblue;" data-toggle="tab">Summary Table</a>
                    </li>
                    <li><a href="#fastqc" style="color: aliceblue;" data-toggle="tab">FastQC</a></li>
                    <li><a href="#kraken_report" style="color: aliceblue;" data-toggle="tab"
                           ng-if="kraken!=''">Kraken</a></li>
                    <li><a href="#information" style="color: aliceblue;" data-toggle="tab">Information</a></li>
                </ul>
            </div>


        </nav>
        <!-- END head Quality Control-->
        <div class="row" style="margin-top: 50px">


            <div class="col-md-12" id="main">


                <!-- TAB-CONTENT-->
                <div class="tab-content">
                    <div class="tab-pane fade" id="sequencer_information">
                        <!--Sidebar-->
                        <div class="col-md-2 sidebar">
                            </br>
                            <ul class="nav">
                                <li><a href="#sequencer_information_table"><h5>Sequencer Information</h5></a></li>
                                <li>
                                    <a href="#sequencer_information_plots"><h5>Sequencer Plots</h5></a></li>

                            </ul>
                        </div>
                        <!-- END Sidebar-->


                        <div class="col-md-10" style="padding-left:17%;">
                            <h4 id="sequencer_information_table">Sequencer Information</h4>
                            <div ng-repeat="(headline, table) in sequencer_information.tables">
                                <br>
                                <h4>{{headline}}</h4><h5 ng-if="isString(table)==true">{{table}}</h5>
                                <table ng-if="isString(table)==false" class="table table-hover">
                                    <tr ng-repeat="(attr, value) in table">
                                        <td class="col-md-1" style="color: rgb(13, 119, 147);">{{attr}}</td>
                                        <td ng-if="isArray(value)==false && isString(value)==true">{{value}}</td>
                                        <td ng-if="isArray(value)==true  ">
                                            <table class="table table-sm"
                                                   style="background-color:inherit; width : auto;">
                                                <tr>
                                                    <td ng-repeat="(headline, value) in value[0]">{{headline}}</td>
                                                </tr>
                                                <tr ng-repeat="nested in value">
                                                    <td ng-repeat="(headline, value) in nested">{{value}}</td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td ng-if="isArray(value)==false && isString(value)==false">
                                            <table class="table table-sm" style="background-color:inherit;width:auto;">
                                                <tr ng-repeat="(headline, value) in value">
                                                    <td class="col-md-1">{{headline}}</td>
                                                    <td ng-if="isArray(value)==false"> {{value}}</td>
                                                    <td ng-repeat="val in value" ng-if="isArray(value)==true"> {{val}}
                                                    </td>
                                                </tr>

                                            </table>
                                        </td>

                                    </tr>
                                </table>
                            </div>

                            <h4 id="sequencer_information_plots">Sequencer Plots</h4>
                            <a ng-repeat="img in sequencer_information.img"
                               ng-click="selected.title=img.title; selected.caption=img.caption; selected.img=img.base64"
                               data-image-id="" data-toggle="modal"
                               data-target="#image-gallery">
                                <img width="400px" height="300px" ng-src="{{img.base64}}" title="{{img.caption}}">
                            </a>


                        </div>


                    </div>
                    <!-- END Sequencer Information content -->
                    <div class="tab-pane fade in active" id="summary">
                        <!-- Summary Table -->
                        <h4>Summary</h4>
                        <table class="table table-striped" style="width:100%">
                            <thead style="font-weight:600;color:#0D7793">
                            <tr>
                                <td class="col-md-1" ng-repeat="(headline,value) in  projects.samples[0]"
                                    ng-if="(headline.indexOf('img') == -1) && (headline.indexOf('_results') == -1) && headline.indexOf('_log') == -1">
                                    {{headline}}
                                </td>
                            </tr>
                            </thead>
                            <tr ng-repeat="sample in projects.samples | orderBy:'Name'">
                                <td ng-repeat="(key,value) in sample "
                                    ng-if="key.indexOf('img') == -1 && key.indexOf('_results') == -1 && key.indexOf('_log') == -1">
                                    <input type="checkbox" ng-model="show_summary[value]" ng-if="key=='Name'"
                                           ng-init="show_summary[value]=true"/>
                                    <ng-value ng-if="key.indexOf('parameter')==-1 && isArray(value)==false">{{value}}
                                    </ng-value>
                                    <div ng-if-start="key.indexOf('parameter')!=-1 || isArray(value)==true"
                                         class="collapse"
                                         id="viewdetails_{{key.replace(' ','')}}_{{sample.Name}}">
                                        <p ng-if="isString(value)==true">{{value}}</p>
                                        <div ng-if=" isString(value)==false">
                                            <table class="table table-sm"
                                                   style="background-color:inherit; width : auto;">
                                                <tr ng-repeat="(head, val) in value">
                                                    <td>{{head}}</td>
                                                    <td>{{val}}</td>
                                                </tr>

                                            </table>
                                        </div>
                                    </div>
                                    <a ng-if-end class="btn showdetails" data-toggle="collapse"
                                       data-target="#viewdetails_{{key.replace(' ','')}}_{{sample.Name}}">Show
                                        details</a>
                                </td>
                            </tr>
                        </table>
                        <!-- END Summary Table -->
                        <div class="col-md-4" ng-repeat = "img in projects.summary_img">

                            <a ng-click="selected.title=''; selected.caption=''; selected.img=img"
                               data-image-id="" data-toggle="modal"
                               data-target="#image-gallery">
                                <img height="500px" ng-src="{{img}}">
                            </a>
                        </div>


                    </div>


                    <div class="tab-pane fade" id="fastqc">
                        <div style="width: 100%; " class="row">
                            <!--Sidebar-->
                            <div class="col-md-2 sidebar">
                                <h4>Filter by ...</h4>
                                <br/>
                                <div class="panel panel-default">
                                    <div class="panel-heading">
                                        <h5 class="panel-title" data-toggle="collapse" data-target="#show_sample">...
                                            sample</h5>

                                    </div>
                                    <div id="show_sample">
                                        <p ng-repeat="(sample, value) in show_summary">
                                            <input type="checkbox" ng-model="show_summary[sample]"
                                                   ng-init="show_summary[sample] = value"/> {{sample}}
                                        </p>
                                    </div>
                                </div>
                                </tr>
                                <div class="panel panel-default">
                                    <div class="panel-heading">
                                        <h5 class="panel-title" data-toggle="collapse" data-target="#show_raw">...
                                            dataset</h5>

                                    </div>
                                    <div id="show_raw" >
                                        <p>
                                            <input type="checkbox" ng-model="show_raw_data"/> show raw data
                                        </p>
                                    </div>
                                </div>
                                <!--Filter by image name-->

                                <div class="panel panel-default">
                                    <div class="panel-heading">
                                        <h5 class="panel-title" data-toggle="collapse" data-target="#show_fastqc">
                                            ... FastQC Images
                                        </h5>
                                    </div>
                                    <div id="show_fastqc"
                                         ng-repeat="sample in projects.samples[0].raw_fastqc_results">
                                        <p ng-repeat="(type,val) in sample.img">
                                            <input type="checkbox" ng-model="show_img[type]"
                                                   ng-init="show_img[type]=true"/> {{type}}

                                        </p>
                                    </div>
                                </div>
                                <!-- END Filter by image name-->
                                <!--Filter by trimmed /untrimmed-->

                                <!-- END Filter by trimmed /untrimmed-->

                            </div>
                            <!-- END Sidebar-->
                            <div style="display: table-row;padding-left:17%;" class="col-md-1">

                                <div class="sample_box"
                                     ng-repeat="sample in projects.samples | orderBy:'Name'| typeFilter: show_summary ">

                                    <p class="inbox_text"><b>{{sample.Name}}</b></p>

                                    <div ng-repeat="(key, sample_img) in sample.raw_fastqc_results"
                                         style="display:table-cell;" ng-if="show_raw_data">
                                        <p class="inbox_text">Raw data</p>

                                        <p class="inbox_text"> {{key}} </p>
                                        <div style="display:inline-block"
                                             ng-repeat="(img_name, img) in sample_img.img "  ng-if ="show_img[img_name] == true">

                                            <a class="thumbnail" href="#" style="box-shadow: 0px 0px 5px {{img.color}}"
                                               ng-click="selected.caption=img_name; selected.title='Raw '+ key; selected.img=img.base64"
                                               data-image-id="" data-toggle="modal"
                                               data-title="Raw {{key}}"
                                               data-caption="{{img_name}}" data-image="{{img.base64}}"
                                               data-target="#image-gallery">
                                                <img width="200px" height="150px" ng-src="{{img.base64}}"
                                                     style="display: block;">
                                            </a>
                                        </div>
                                    </div>

                                    <div ng-repeat="(key, sample_img) in sample.trimmed_fastqc_results "
                                         style="display:table-cell;">
                                        <p class="inbox_text">Trimmed data</p>

                                        <p class="inbox_text"> {{key}} </p>
                                        <div style="display:inline-block"
                                             ng-repeat="(img_name, img) in sample_img.img "  ng-if ="show_img[img_name] == true">

                                            <a class="thumbnail" href="#" style="box-shadow: 0px 0px 5px {{img.color}};"
                                               ng-click="selected.caption=img_name; selected.title='Trimmed '+ key; selected.img=img.base64"
                                               data-image-id="" data-toggle="modal"
                                               data-title="Raw {{key}}"
                                               data-caption="{{img_name}}" data-image="{{img.base64}}"
                                               data-target="#image-gallery">
                                                <img width="200px" height="150px" ng-src="{{img.base64}}"
                                                     style="display: block;">
                                            </a>
                                        </div>
                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- END FastQC -->

                    <!-- Kraken Report -->
                    <div class="tab-pane fade" id="kraken_report">
                        <iframe src="kraken.html" width="100%" height="1000">
                            <p>Your browser does not support iframes.</p>
                        </iframe>
                    </div>

                    <!-- END Kraken Report -->


                    <div class="tab-pane fade" id="information" style="margin:10px">
                        <div ng-repeat="(headline, table) in information">
                            <br>
                            <h4>{{headline}}</h4><h5 ng-if="isString(table)==true">{{table}}</h5>
                            <table ng-if="isString(table)==false" class="table table-hover">
                                <tr ng-repeat="(attr, value) in table">
                                    <td class="col-md-1" style="color: rgb(13, 119, 147);">{{attr}}</td>
                                    <td ng-if="isArray(value)==false && isString(value)==true">{{value}}</td>
                                    <td ng-if="isArray(value)==true  ">
                                        <table class="table table-sm" style="background-color:inherit; width : auto;">
                                            <tr>
                                                <td ng-repeat="(headline, value) in value[0]">{{headline}}</td>
                                            </tr>
                                            <tr ng-repeat="nested in value">
                                                <td ng-repeat="(headline, value) in nested">{{value}}</td>
                                            </tr>
                                        </table>
                                    </td>
                                    <td ng-if="isArray(value)==false && isString(value)==false">
                                        <table class="table table-sm" style="background-color:inherit;width:auto;">
                                            <tr ng-repeat="(headline, value) in value">
                                                <td class="col-md-1">{{headline}}</td>
                                                <td ng-if="isArray(value)==false"> {{value}}</td>
                                                <td ng-repeat="val in value" ng-if="isArray(value)==true"> {{val}}</td>
                                            </tr>

                                        </table>
                                    </td>

                                </tr>
                            </table>
                        </div>


                    </div>
                    <!-- END tab content-->
                </div>

            </div>
        </div>
        <!-- Modal -->
        <div class="modal fade" id="image-gallery" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
             aria-hidden="true">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <div class="col-md-8 text-justify" id="image-gallery-title"><h4>{{selected.title}}</h4>
                        </div>

                    </div>
                    <div class="modal-body modal-lg">
                        <img id="image-gallery-image" style="height:100%;width:100%;" class="img-responsive"
                             src="{{selected.img}}">
                    </div>
                    <div class="modal-footer">
                        <div class="col-md-12 text-justify" id="image-gallery-caption">{{selected.caption}}
                        </div>
                    </div>
                </div>
            </div>
            <!-- END Modal -->
        </div>
        <!-- END div row-->
        <!-- Trigger the modal with a button -->


    </div>
    <!-- END Summary Table Controller-->

</div>

</div>


</body>
</html>