Mercurial > repos > sblanck > smagexp
comparison MetaMa_tpl.html @ 0:1024245abc70 draft
planemo upload for repository https://github.com/sblanck/smagexp/tree/master/smagexp_tools commit 5974f806f344dbcc384b931492d7f023bfbbe03b
author | sblanck |
---|---|
date | Thu, 22 Feb 2018 08:38:22 -0500 |
parents | |
children | 3ce32282f6a4 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1024245abc70 |
---|---|
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
5 <meta name="viewport" content="width=device-width,initial-scale=1"> | |
6 <title>DataTables example - Ajax sourced data</title> | |
7 <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.10/css/jquery.dataTables.min.css"> | |
8 <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.1.0/css/buttons.dataTables.min.css"> | |
9 | |
10 <!--link rel="stylesheet" type="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> | |
11 <link rel="stylesheet" type="https://cdn.datatables.net/1.10.11/css/dataTables.bootstrap.min.css"--> | |
12 | |
13 <style type="text/css" class="init"> | |
14 | |
15 td.details-control { | |
16 background: url('../../../static/images/fugue/toggle-expand.png') no-repeat center center; | |
17 cursor: pointer; | |
18 } | |
19 tr.shown td.details-control { | |
20 background: url('../../../static/images/fugue/toggle.png') no-repeat center center; | |
21 } | |
22 | |
23 .dataTable th,.dataTable td { | |
24 | |
25 text-overflow: ellipsis; | |
26 max-width: 200px; | |
27 min-width: 40px; | |
28 -o-text-overflow: ellipsis; | |
29 -ms-text-overflow: ellipsis; | |
30 -moz-text-overflow: ellipsis; | |
31 width: 100px; | |
32 white-space:nowrap; | |
33 overflow: hidden; | |
34 | |
35 | |
36 padding: 10px; | |
37 | |
38 } | |
39 | |
40 | |
41 </style> | |
42 | |
43 <script type="text/javascript" language="javascript" src="https://code.jquery.com/jquery-1.12.0.min.js"> | |
44 </script> | |
45 <script type="text/javascript" language="javascript" src="https://cdn.datatables.net/1.10.11/js/jquery.dataTables.min.js"> | |
46 </script> | |
47 <!--script type="text/javascript" language="javascript" src="https://cdn.datatables.net/1.10.11/js/dataTables.bootstrap.min.js"> | |
48 </script--> | |
49 <script type="text/javascript" language="javascript" src="https://cdn.datatables.net/buttons/1.1.0/js/dataTables.buttons.min.js"> | |
50 </script> | |
51 <script type="text/javascript" language="javascript" src="https://cdn.datatables.net/buttons/1.1.0/js/buttons.flash.min.js"> | |
52 </script> | |
53 <script type="text/javascript" language="javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js"> | |
54 </script> | |
55 <script type="text/javascript" language="javascript" src="https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/pdfmake.min.js"> | |
56 </script> | |
57 <script type="text/javascript" language="javascript" src="https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/vfs_fonts.js"> | |
58 </script> | |
59 <script type="text/javascript" language="javascript" src="https://cdn.datatables.net/buttons/1.1.0/js/buttons.html5.min.js"> | |
60 </script> | |
61 <script type="text/javascript" class="init"> | |
62 | |
63 | |
64 | |
65 function format ( d ) { | |
66 // `d` is the original data object for the row | |
67 var test=d[6].split("///"); | |
68 var strLength=test.length; | |
69 var result=""; | |
70 for (var i=0;i<strLength;i++) { | |
71 result=result+'<a href="http://amigo.geneontology.org/amigo/term/'+test[i]+'">'+test[i]+'</a>'+', '; | |
72 } | |
73 return '<table cellpadding="5" cellspacing="0" border="0" style="padding-left:50px;">'+ | |
74 '<tr>'+ | |
75 '<td>Gene Symbol:</td>'+ | |
76 '<td style="width:100%;overflow: hidden;white-space: normal;">'+'<a href="http://www.ncbi.nlm.nih.gov/gene/'+d[4]+'">'+d[2]+'</a>'+'</td>'+ | |
77 '</tr>'+ | |
78 '<tr>'+ | |
79 '<td>Gene Title:</td>'+ | |
80 '<td style="width:100%;overflow: hidden;white-space: normal;">'+d[3]+'</td>'+ | |
81 '</tr>'+ | |
82 '<tr>'+ | |
83 '<td>GO Function ID:</td>'+ | |
84 '<td style="width:100%;overflow: hidden;white-space: normal;">'+result+'</td>'+ | |
85 '</tr>'+ | |
86 '</table>'; | |
87 } | |
88 | |
89 var dataSet=###DATAJSON###; | |
90 var summarySet=###SUMMARYJSON###; | |
91 | |
92 $(document).ready(function() { | |
93 var table = $('#example').DataTable( { | |
94 "scrollX": true, | |
95 data: dataSet, | |
96 "columns": [ | |
97 { | |
98 "className": 'details-control', | |
99 "orderable": false, | |
100 "data": null, | |
101 "defaultContent": '' | |
102 }, | |
103 {title : "ID" }, | |
104 {title : "Gene_symbol"}, | |
105 {title : "Gene_title"}, | |
106 {title : "Gene_ID"}, | |
107 {title : "Chromosome_annotation"}, | |
108 {title : "GO_Function_ID"} | |
109 | |
110 ], | |
111 | |
112 dom: 'Bfrtlip', | |
113 buttons: [ | |
114 'copy', 'csv', 'excel' | |
115 ] | |
116 | |
117 } ); | |
118 | |
119 // Add event listener for opening and closing details | |
120 $('#example tbody').on('click', 'td.details-control', function () { | |
121 var tr = $(this).closest('tr'); | |
122 var row = table.row( tr ); | |
123 | |
124 if ( row.child.isShown() ) { | |
125 // This row is already open - close it | |
126 row.child.hide(); | |
127 tr.removeClass('shown'); | |
128 } | |
129 else { | |
130 // Open this row | |
131 row.child( format(row.data()) ).show(); | |
132 tr.addClass('shown'); | |
133 } | |
134 } ); | |
135 } ); | |
136 | |
137 | |
138 | |
139 $(document).ready(function() { | |
140 $('#summary').DataTable( { | |
141 "columnDefs": [ | |
142 { className: "dt-center", targets: '_all' } | |
143 ], | |
144 "paging": false, | |
145 "ordering": false, | |
146 "info": false, | |
147 "searching": false, | |
148 data: summarySet, | |
149 "columns": [ | |
150 {title : "DE" }, | |
151 {title : "IDD" }, | |
152 {title : "Loss" }, | |
153 {title : "IDR" }, | |
154 {title : "IRR" }, | |
155 | |
156 | |
157 ], | |
158 | |
159 } ); | |
160 } ); | |
161 | |
162 | |
163 | |
164 </script> | |
165 </head> | |
166 | |
167 <body> | |
168 | |
169 <table><tr><td> | |
170 <h2>Venn diagram</h2> | |
171 <img src='###VENN###' height="400" width="400"><br/> | |
172 </td><td> | |
173 | |
174 </td></tr></table> | |
175 | |
176 <h2>Summary</h2> | |
177 <table id="summary" class="compact stripe row-border" cellspacing="0" width="100%"> </table> | |
178 </br> | |
179 DE : Number of differentially expressed genes </br> | |
180 IDD (Integration Driven discoveries) : number of genes that are declared DE in the meta-analysis that were not identified in any of the individual studies alone</br> | |
181 Loss : Number of genes that are identified DE in individual studies but not in meta-analysis </br> | |
182 IDR (Integration-driven Discovery Rate) : corresponding proportions of IDD </br> | |
183 IRR (Integration-driven Revision) : corresponding proportions of Loss</br> | |
184 <h2>Details</h2> | |
185 <table id="example" class="compact stripe row-border" cellspacing="0" width="100%"> | |
186 </table> | |
187 </body> | |
188 </html> |