-
Notifications
You must be signed in to change notification settings - Fork 8
/
index.html
230 lines (221 loc) · 6.48 KB
/
index.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="apple-touch-icon" sizes="180x180" href="./apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./favicon-16x16.png">
<link rel="manifest" href="./site.webmanifest">
<link rel="mask-icon" href="./safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-config" content="./browserconfig.xml" />
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<meta charset="UTF-8" />
<title>SafFire</title>
<!-- Load d3.js -->
<script src="https://d3js.org/d3.v7.min.js"></script>
<script src="https://d3js.org/d3-color.v2.min.js"></script>
<script src="https://d3js.org/d3-dispatch.v2.min.js"></script>
<script src="https://d3js.org/d3-ease.v2.min.js"></script>
<script src="https://d3js.org/d3-interpolate.v2.min.js"></script>
<script src="https://d3js.org/d3-selection.v2.min.js"></script>
<script src="https://d3js.org/d3-timer.v2.min.js"></script>
<script src="https://d3js.org/d3-transition.v2.min.js"></script>
<script src="https://d3js.org/d3-drag.v2.min.js"></script>
<script src="https://d3js.org/d3-zoom.v2.min.js"></script>
<script src="lib.js"></script>
<style>
input[type="file"] {
display: none;
}
.header {
/*position: sticky;*/
top: 0;
margin: 0;
height: 80px;
z-index: 9999;
width: 100%;
vertical-align: middle;
border: 1.5px solid rgba(2, 145, 170, 0.473);
border-radius: 0px;
background-color: rgba(194, 220, 243, 0.884);
}
.custom-file-upload {
margin: auto;
width: 12%;
vertical-align: middle;
font: 12px sans-serif;
text-align: center;
cursor: pointer;
display: inline-block;
}
.svg-container {
margin: auto;
display: inline-block;
/*position: relative;*/
position: sticky;
}
.svg-content-responsive {
display: inline-block;
/*position: absolute;*/
width: 98%;
position: sticky;
}
div.tooltip {
position: absolute;
text-align: center;
width: -moz-fit-content;
width: fit-content;
padding: 2px;
font: 12px sans-serif;
pointer-events: none;
}
div.coordinates {
vertical-align: top;
margin: auto;
position: absolute;
width: 100%;
top: 90px;
text-align: center;
height: 60px;
padding: 0px;
font: 16px sans-serif;
z-index: -1;
}
body {
margin: 0%;
}
#browser-container img {
max-width: 98%;
}
.browser-img {
margin-left: 40px;
display: block;
}
#chart svg {
position: sticky;
margin: auto;
max-width: 95%;
display: block;
overflow: visible;
}
.chart {
position: sticky;
margin: auto;
max-width: 98%;
display: block;
overflow: visible;
}
</style>
<body>
<!--THE HEADER SECTION-->
<div id="header" class="header">
<!-- Initialize a select button -->
<label class="custom-file-upload">
<a href="https://github.com/mrvollger/SafFire">
<img
src="SafFire_logo.svg"
alt="triangle with all three sides equal"
height="50"
width="60"
/>
<br>
View on GitHub
</a>
</label>
<!-- Initialize a select button -->
<label class="custom-file-upload">
<b>Select alignment dataset</b>
<br />
<select id="datasetGenomes"></select>
<br />
</label>
<!-- Initialize a select button -->
<label class="custom-file-upload">
<b>Select target and query genome</b>
<br />
<select id="targetGenome"></select>
<select id="queryGenome"></select>
<br />
<b>Select target and query contig</b>
<br />
<select id="targetButton"></select>
<select id="queryButton"></select>
</label>
<!-- Initialize a select button -->
<label class="custom-file-upload">
Load alignment data
<br />
<a href="https://github.com/mrvollger/SafFire#how-to-prepare-your-genome-alignment-for-saffire">(How to make your own input)</a>
<input type="file" id="uploader" />
</label>
<!-- Initialize a select button -->
<div class="custom-file-upload">
<label>
Load bed9 data for the target
<input type="file" id="uploaderbed" />
</label>
<br />
<br />
<label>
Load bed9 data for the query
<input type="file" id="uploaderquerybed" />
</label>
</div>
<!-- Initialize a select button -->
<label class="custom-file-upload">
Add <b>UCSC</b> snapshot
<br />
<input type="button" onClick="reload();" value="Reload image" />
</label>
<!-- Initialize a select button -->
<label class="custom-file-upload">
Load your own
<a href="http://genome.ucsc.edu/goldenPath/help/hgSessionHelp.html">
UCSC session
</a>
<br />
<input
type="text"
id="UCSCuser"
placeholder="UCSC user name"
value="mrvollger"
/>
<br />
<input
type="text"
id="UCSCsession"
placeholder="session name"
value="T2T"
/>
</label>
<!-- Initialize a save file button -->
<label class="custom-file-upload">
<div><input type="button" value="Invert query" id="invert"</input></div>
<div><input type="button" onClick="save_svg();" value=" Save SVG " /></div>
</label>
</div>
<!-- RUST CODE LOADER -->
<script src="./pkg/saffire.js"></script>
<!-- END RUST CODE LOADER -->
<!-- Create a div where the graph will take place -->
<script type="text/javascript" src="setup.js"></script>
<script type="text/javascript" src="SafFire.js"></script>
<div id="chart">
<script>
upload_button("uploader");
</script>
<script>
uploadbed("uploaderbed");
</script>
<script>
uploadbed("uploaderquerybed");
</script>
</div>
<div id="browser-container">
<img id="browser-img" class="browser-img" />
</div>
<div id="browser-url">
<img id="browser-url" class="browser-url" />
</div>
</body>
</html>