This repository was archived by the owner on Jul 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtable-ww.html
More file actions
106 lines (88 loc) · 2.94 KB
/
table-ww.html
File metadata and controls
106 lines (88 loc) · 2.94 KB
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
<!DOCTYPE html>
<html><head>
<title>Web Worker Test</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="html.css"/>
<script type="text/javascript">var BGV={
onload:function(){
var prefix='BGV_';
BGV.tags={
edgeCount:document.getElementsByClassName(prefix+'edgeCount')
};
},
updateTag:function(tag,value){
for(var i=0;i<BGV.tags[tag].length;i++){
BGV.tags[tag][i].textContent=value;
}
}
};</script>
<script type="text/javascript" src="BGV/Interactions.js"></script>
<script type="text/javascript" src="../jquery.min.js"></script>
<script type="text/javascript" src="../jquery.tablesorter.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var w=new Worker('ww.js'+location.search);
var log=document.getElementById('log');
var iTable=document.getElementById('interactions');
var iTBody=iTable.getElementsByTagName('tbody')[0];
var ts=$(iTable).tablesorter();
$.getJSON('BGV/taxa.json',function(t){
var interactions=new BGV.Interactions(t);
w.onmessage=function(m){
interactions.assimilate(m.data);
interactions.forEach(function(i){
i.trHTML(iTBody);
});
ts.trigger('update');
BGV.updateTag('edgeCount',interactions.interactionCount());
console.log(interactions.interactionCount());
}
});
var tog=function(){
var data={};
data[this.getAttribute('name')]=[this.checked.toString().toUpperCase()];
w.postMessage(data);
};
$(document.getElementsByName('interSpeciesExcluded')).change(tog);
$(document.getElementsByName('selfInteractionsExcluded')).change(tog);
$(document.getElementsByName('includeInteractorInteractions')).change(tog);
$(document.getElementsByName('throughputTag')).change(function(){
var data={};
data[this.getAttribute('name')]=[this.getAttribute('value')];
w.postMessage(data);
});
});
</script>
</head><body onload="BGV.onload()">
<fieldset>
<p><label><input type="checkbox" name="interSpeciesExcluded">Interspecies Exclude</label></p>
<p><label><input type="checkbox" name="selfInteractionsExcluded">Self Interaction Exclude</label></p>
<p><label><input type="checkbox" name="includeInteractorInteractions">Interactor Interactions Include</label></p>
</fieldset>
<fieldset><legend>Throughput</legend>
<label><input type="radio" name="throughputTag" value="any" checked="checked">Any</label>
<label><input type="radio" name="throughputTag" value="low">Low</label>
<label><input type="radio" name="throughputTag" value="high">High</label>
</fieldset>
<table id="interactions" class="tablesorter">
<caption>Edge Count:<span class="BGV_edgeCount">unknown</span></caption>
<thead><tr>
<th>Interactor A</th>
<th>Interactor B</th>
<th>Experimental Evidence Code</th>
<th>Publication</th>
<th>Throughput</th>
<th>Qualifications</th>
</tr></thead>
<tbody></tbody>
<tfoot><tr>
<th>Interactor A</th>
<th>Interactor B</th>
<th>Experimental Evidence Code</th>
<th>Publication</th>
<th>Throughput</th>
<th>Qualifications</th>
</tr></tfoot>
</table>
<pre id="log"></pre>
</body></head>