-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.html
159 lines (154 loc) · 6.88 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>
rankratioviz
</title>
<link rel="shortcut icon" href="icon.png" />
<link rel="stylesheet" href="rankratioviz.css" />
</head>
<body>
<table id="rrvTable">
<!-- Show the actual plots -->
<tr>
<td class="plotTD" id="rankPlotTD">
<div id="rankPlot"></div>
</td>
<td class="plotTD" id="samplePlotTD">
<div id="samplePlot"></div>
<br />
<!-- NOTE that the scale/field select values below will be
literally used in the JSON.
Also, the first-listed one is the default. Since the
default x-axis is the balance (quant.) and the default
color is the sample ID (nom.), we adjust the default
scale types accordingly.
-->
<label for="xAxisField">x-axis field</label>
<select id="xAxisField"> </select>
<label for="xAxisScale">x-axis scale type</label>
<select id="xAxisScale">
<option value="quantitative">Quantitative</option>
<option value="nominal">Categorical</option>
</select>
<br />
<label for="colorField">color field</label>
<select id="colorField"> </select>
<label for="colorScale">color scale type</label>
<select id="colorScale">
<option value="nominal">Categorical</option>
<option value="quantitative">Quantitative</option>
</select>
</td>
</tr>
<tr>
<td class="topAlignedTD">
<h3>Single-Feature Selections</h3>
<p>
Select two features from the rank plot (left) to display
their log ratios for each sample in the sample
scatterplot (right).
</p>
<!-- Note for future reference: whitespace between the
start and end tag of a textarea is apparently
interpreted as just that, and preserved in the textarea
on the page.
(So that's why the textarea declarations below are on
long lines.)
-->
<p>
<textarea id="topFeaturesDisplay" rows="6"></textarea>
</p>
<hr />
<p>
<textarea id="botFeaturesDisplay" rows="6"></textarea>
</p>
</td>
<td>
<h3>Multi-Feature Selections</h3>
<p>
Use the controls here to show more complex log ratios in
the sample scatterplot.
</p>
<p>
Filter numerator to features that
<select id="topSearch">
<option value="text">
contain the exact text
</option>
<option value="rank">
contain the exact taxonomic rank(s)
</option>
</select>
<input type="text" id="topText" size="40" />
</p>
<p>
Filter denominator to features that
<select id="botSearch">
<option value="text">
contain the exact text
</option>
<option value="rank">
contain the exact taxonomic rank(s)
</option>
</select>
<input type="text" id="botText" size="40" />
</p>
<!-- Invisible <a> used for downloading data URIs.
Based on #downloadHelper in MetagenomeScope's viewer
interface.
-->
<a id="downloadHelper"></a>
<p>
<button id="multiFeatureButton">
Regenerate sample plot
</button>
</p>
<p>
<button id="exportDataButton">
Export currently used data
</button>
</p>
<!--
<p>
<label for="selectMicrobesFileSelector">
<strong>
Upload "Select Features" List:
</strong>
</label>
TODO make RRVDisplay get this input by ID
and set its onchange to the RRVDisplay instance's
particular select microbes or whatever function
<input type="file" id="selectMicrobesFileSelector"
onChange="ssmv.uploadSelectMicrobesFile();" />
</p>
<p>
<label for="zeroFillInput">
<strong>
Value to fill in for zero-abundance features:
</strong>
</label>
<input type="number" id="zeroFillInput" min="0"
max="1000" value="0">
</input>
</p>
-->
</td>
</tr>
</table>
<!-- This file will be edited by the rankratioviz python script to
contain definitions for the rank plot and sample plot JSON,
and will use these to create an instance of RRVDisplay
(thereby starting rankratioviz).
Leaving this code at the bottom of the page is sufficient to wait
until the rest of the stuff in the page has been loaded:
see https://stackoverflow.com/a/1861233.
We need to wait for the page to load before calling
RRVDisplay.makePlots(); otherwise, we'll get (at least) the error
"ERROR: Signal bind element not found: null" described at
https://github.com/vega/vega-embed/issues/64.
-->
<script data-main="main" src="vendor/require.js"></script>
</body>
</html>