-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
317 lines (246 loc) · 9.23 KB
/
index.php
File metadata and controls
317 lines (246 loc) · 9.23 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
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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<?php
// Include Functions
$path = "./";
include("/share1/proj/eem/templates/functions.php");
include($path . "includes/uploadtext.php"); // forms & text for upload fields
// Start Session
$session_in_progress = true;
if (empty($_POST)) { // initally
$session_in_progress = false;
session_id( generateSessionID() ); // generate new id once
}
session_start(); // start new session
$id = session_id(); // get session id
// header
include($path . "header.php");
// show Introduction
showIntroductionMessage();
?>
<div id="selectFiles">
<form method="post" action="./<?php echo $id; ?>" enctype="multipart/form-data">
<input type="hidden" name="id" value="<?php echo $id; ?>">
<input type="hidden" name="start" value="yes">
<table id="uploadtable">
<tr>
<td class="bold">Session ID</td>
<td id="sessionID"><?php echo $id; ?></td>
</tr>
<tr>
<td class="bold">
Expression Dataset<br />
<span id="expressionStatus" class="progress"></span>
</td>
<td>
<div id="expression">
<select id="select_expression" name="ex_select">
<option value="local" selected>Local File</option>
<option value="remote">Remote File</option>
<option value="example">Example</option>
</select>
<div class="local">
<span id="expressionContainer">
<input id="expressionChooser" type="submit" value="Choose File" size="40">
<span id="expressionFileList"></span>
<span id="expressionUploadProgress" class="progress"></span>
</span>
</div>
<span class="remote">
<label for="ex_remote" ><input id="ex_remote" type="url" name="ex_remote" placeholder="http://..." size="30" ></label>
<button id="use">Upload</button>
<span id="expressionRemoteUploadProgress" class="progress"></span>
</span>
<span class="example">
<select id="ex_example" name="ex_example">
<option value="test.tab">Breast tumor microarray data</option>
</select>
<button id="use">Use</button>
<span id="expressionExampleUploadProgress" class="progress"></span>
</span>
</div>
<div id="preprocess" class="small">
<a href="#" id="showAdvancedOptions">Advanced Preprocessing Options...</a>
<div id="advancedOptions">
<table id="advancedOptionsTable">
<tr>
<td colspan="2" class="em gray">Preprocess the expression file. Convert probe IDs to gene symbols.</td>
</tr>
<tr>
<td colspan="2" class="gray">
The CHIP file format contains annotation information about a microarray.
It lists the features (i.e probe sets) used in the microarray along with their mapping
to gene symbols (when available). <br />
More information about the CHIP file format can be found <a href="http://www.broadinstitute.org/cancer/software/genepattern/gp_guides/file-formats/sections/chip">here</a>.
</td>
</tr>
<tr>
<td>
<select id="select_preprocess" name="preprocess_select">
<option value="none" selected>-</option>
<option value="local">Local File</option>
<option value="remote">Remote File</option>
<option value="example">Example</option>
</select>
</td>
<td>
<div class="local">
<span id="preprocessContainer">
<input id="preprocessChooser" type="submit" value="Choose File" size="40">
<span id="preprocessFileList"></span>
<span id="preprocessUploadProgress" class="progress"></span>
</span>
</div>
<span class="remote">
<label for="preprocess_remote"><input id="preprocess_remote" type="url" name="preprocess_remote" placeholder="http://..." size="30" ></label>
<button id="use">Upload</button>
<span id="preprocessRemoteUploadProgress" class="progress"></span>
</span>
<span class="example">
<select id="preprocess_example" name="preprocess_example">
<option value="human.chip">human.chip</option>
</select>
<button id="use">Use</button>
<span id="preprocessExampleUploadProgress" class="progress"></span>
</span>
</td>
</tr>
<tr>
<td><input type="checkbox" name="logscale" id="logscale"></td>
<td>Convert Expression Value to the log-scale.</td>
</tr>
<tr>
<td><input type="number" name="variations" id="variations" value="8000" min="1000" max="20000"></td>
<td>Number of genes after variation filter <em>(default=8000)</em></td>
</tr>
<tr>
<td colspan="2"><button id="preprocessButton" disabled>Preprocess Expression...</button><span id="preprocessProgress" class="progress"></span></td>
</tr>
</table>
</div>
</div>
<div class="more"></div>
<div class="small">
This file includes features (genes or probes), samples, and an expression
value for each feature in each sample. The two file formats are available:
A simple tab-delimited format for expression dataset (*.tab, <a href="https://eem.hgc.jp/examples/expression/test.tab">example</a>),
or the GCT Text file format (*.gct), which are supported in
<a href="http://www.broadinstitute.org/gsea/">GSEA</a>.
</div>
</td>
</tr>
<tr>
<td class="bold">Gene Sets</td>
<td>
<div id="geneset">
<select id="select_geneset" name="gene_select">
<option value="local" selected>Local File</option>
<option value="remote">Remote File</option>
<option value="example">Example</option>
</select>
<div class="local">
<span id="genesetContainer">
<input id="genesetChooser" type="submit" value="Choose File" size="40">
<span id="genesetFileList"></span>
<span id="genesetUploadProgress" class="progress"></span>
</span>
</div>
<span class="remote">
<label for="gene_remote">http://<input id="gene_remote" type="url" name="gene_remote" placeholder="http://..." size="30" ></label>
<button id="use">Upload</button>
<span id="genesetRemoteUploadProgress" class="progress"></span>
</span>
<span class="example">
<select id="gene_example" name="gene_example">
<option value="test.gmt"> gene sets associated with common GO terms </option>
</select>
<button id="use">Use</button>
<span id="genesetExampleUploadProgress" class="progress"></span>
</span>
</div>
<div class="small">
This file includes one or more predefined gene sets like gene sets from the Molecular
Signature Database (<a href="http://www.broadinstitute.org/gsea/msigdb/">MSigDB</a>) or your own defined gene sets. For each gene set,
the gene set name, its brief description, and genes in the gene set are given.
The file format should be followed by the GMT file format
(*.gmt, <a href="https://eem.hgc.jp/examples/geneset/test.gmt">example</a>).
</div>
</td>
</tr>
<tr>
<td> </td>
<td class="right">
<span id="checkingMessage" class="left small message"></span>
<input id="start" type="submit" value="Start EEM" disabled="disabled">
</td>
</tr>
</table>
</form>
</div>
<script type="text/javascript">
// Custom example logic
// Upload Factory
function createUploader(type) {
uploader = new plupload.Uploader({
runtimes : 'html5,flash,html4',
browse_button : type+'Chooser',
container: 'container',
max_file_size : '100mb',
chunk_size: '1mb', // chunking to prevent php upload limit
url: "/upload/upload.php?type="+type+"&id="+id, // pass msg along
urlstream_upload: true,
multiple_queues: true,
multipart: true,
max_file_count : 1,
flash_swf_url : '../js/plupload.flash.swf',
filters : [
{title : "Image files", extensions : "jpg,gif,png"},
{title : "Zip files", extensions : "zip,*"}
],
init : {
FilesAdded: function(up, files) {
up.start(); // start uploading file right after adding
$("#expressionPreprocessProgress").html(""); // remove previous preprocessing message
},
UploadComplete: function(up, files) {
// console.log("Local Upload Complete");
},
Error: function(up, error) {
console.log("Error", up, error);
},
FileUploaded: function(up, file, res) {
console.log("Local "+ type + "File Uploaded", res);
if (type==="expression") {
console.log("Submit preprocess");
submitPreprocessRequest(); // submitFileCheck is done after preprocessing
}
if (type==="geneset") {
console.log("Submit preprocess");
submitFileCheck();
}
if (type==="preprocess") {
}
}
}
});
uploader.bind('FilesAdded', function(up, files) {
for (var i in files) {
$('#'+type+'FileList').text(files[i].name + ' (' + plupload.formatSize(files[i].size) + ')');
}
});
uploader.bind('UploadProgress', function(up, file) {
$('#'+type+'UploadProgress').text(file.percent + "%"); // update upload progress
});
uploader.init();
return uploader;
}
// Uploaders
var expression;
var geneset;
var preprocess;
// Create Uploaders
$(document).ready(function() {
expression = createUploader('expression');
geneset = createUploader('geneset');
preprocess = createUploader('preprocess');
});
</script>
<?php include($path . "footer.php"); ?>