-
Notifications
You must be signed in to change notification settings - Fork 3
/
seqlogo_test.html
77 lines (77 loc) · 2.44 KB
/
seqlogo_test.html
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
<!doctype html>
<html>
<head>
<title>Sequence Logo Example</title>
<style>
body {
font-family: Geneva, Helvetica, Verdana;
font-size: 12pt;
}
</style>
<script src="seqlogo.js"></script>
<script type="text/javascript">
function initCanvas() {
var pssm = {
alphabet: ['A', 'G', 'C', 'T'],
values: [
[ 0, 0, 0.888889, 0.111111 ],
[ 0.722222, 0, 0.277778, 0 ],
[ 0, 0.833333, 0, 0.166667 ],
[ 0.166667, 0.5, 0.277778, 0.055556 ],
[ 0.232532, 0.073023, 0.684134, 0.01031 ],
[ 0.454755, 0.017468, 0.350801, 0.176977 ],
[ 0.121421, 0.628579, 0.017468, 0.232532 ],
[ 0.51031, 0.073023, 0.184134, 0.232532 ],
[ 0, 0.055556, 0, 0.944444 ],
[ 0, 0, 0.555556, 0.444444 ],
[ 0.277778, 0.666667, 0, 0.055556 ],
[ 0, 0.833333, 0, 0.166667 ]
]
};
var canvasOptions = {
width: 400,
height: 200,
style: {
width: '100%', height: 200, font: '20pt Helvetica'
}
};
seqlogo.makeLogo('canvas', pssm, canvasOptions);
}
</script>
</head>
<body onload="initCanvas()">
<h2>Example For a Nucleotide Sequence Logo</h2>
<div id="canvas"></div>
<h3>Javascript code</h3>
<pre>
function initCanvas() {
var pssm = {
alphabet: ['A', 'G', 'C', 'T'],
values: [
[ 0, 0, 0.888889, 0.111111 ],
[ 0.722222, 0, 0.277778, 0 ],
[ 0, 0.833333, 0, 0.166667 ],
[ 0.166667, 0.5, 0.277778, 0.055556 ],
[ 0.232532, 0.073023, 0.684134, 0.01031 ],
[ 0.454755, 0.017468, 0.350801, 0.176977 ],
[ 0.121421, 0.628579, 0.017468, 0.232532 ],
[ 0.51031, 0.073023, 0.184134, 0.232532 ],
[ 0, 0.055556, 0, 0.944444 ],
[ 0, 0, 0.555556, 0.444444 ],
[ 0.277778, 0.666667, 0, 0.055556 ],
[ 0, 0.833333, 0, 0.166667 ]
]
};
var canvasOptions = {
width: 400,
height: 200,
style: {
width: 400, height: 200,
font: '20pt Helvetica'
}
};
seqlogo.makeLogo('canvas', pssm, canvasOptions);
}
</pre>
</body>
</html>