-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
284 lines (284 loc) · 18 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>TCGA Toolbox</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/png" href="icon_16.png" />
<link rel="stylesheet" href="css/bootstrap.css" />
<link rel="stylesheet" href="css/bootstrap-table.css" />
<link rel="stylesheet" href="css/main.css" />
<link rel="stylesheet" href="css/bootstrap-responsive.css" />
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="brand" href="/Toolbox/">TCGA Toolbox</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li><a href="#modules" data-toggle="tab">Modules</a></li>
<li><a href="#docs" data-toggle="tab">Documentation</a></li>
</ul>
</div>
</div>
</div>
</div>
<div id="main" class="container tab-content">
<div id="home" class="tab-pane active hero-unit">
<h1>TCGA Toolbox</h1>
<p>TCGA Toolbox provides a scripting environment to retrieve, store, and analyze data from <a href="http://cancergenome.nih.gov/">The Cancer Genome Atlas (TCGA)</a> in the browser. It can be extended by <a href="#modules" data-toggle="tab">loading modules</a>, or used interactively from the browser's <a href="https://developers.google.com/chrome-developer-tools/docs/overview">JavaScript console</a>.</p>
<p>This is a work in progress. The code is hosted on <a href="https://github.com/tcga/web-toolbox">GitHub</a>.</p>
</div>
<div id="modules" class="tab-pane">
<div class="page-header">
<h1>Modules</h1>
</div>
<p>TCGA Toolbox can be extended by loading remote scripts—either by specifying the URL or by selecting one from our trusted authors.</p>
<h2>Load module by URL</h2>
<div>
<form id="url-module-loader" class="form-inline">
<input type="text" class="span10" placeholder="URL of a module" />
<button class="btn" data-loading-text="Loading...">Load module</button>
</form>
</div>
<h2>Load module by author</h2>
<div>
<form id="list-module-loader" class="form-inline">
<select id="authors">
<option selected="selected" disabled="disabled">Loading authors ...</option>
</select>
</form>
</div>
<h2>Loaded modules</h2>
<div id="registered-modules">
<p>You have not loaded a module yet. Why not <a id="promoted-module" href="https://agrueneberg.github.io/TCGA.rppa/rppa.js">try RPPA</a>, a module for real time analysis of reverse phase protein array data?</p>
<ul></ul>
</div>
<h2>Share your workflow</h2>
<p>Let other researchers reproduce your work by copying and sharing the following URL.</p>
<form id="share-modules" class="form-inline">
<input type="text" name="url" class="span10" readonly="readonly" />
<input type="submit" class="btn" value="Copy" />
</form>
</div>
<div id="docs" class="tab-pane">
<div class="page-header">
<h1>Documentation</h1>
</div>
<p>TCGA Toolbox provides some useful functions scoped in the global <code>TCGA</code> namespace to interact with <a href="http://cancergenome.nih.gov/">TCGA</a>.</p>
<p>Unless stated otherwise, the first argument of a callback function is reserved for an error object, a useful convention to allow error catching in asynchronous programming. If an error object is <code>null</code> no error occurred.</p>
<h2>Load scripts</h2>
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td class="span5"><code>TCGA.loadScript(url, callback)</code></td>
<td>
Loads one or more scripts over HTTPS <strong>(HTTP is not supported)</strong> using HTML script elements.<br />
<code>url</code> is a string or a string array of URLs, <code>callback</code> a function with two parameters, an error object and a string array of loaded scripts.
</td>
</tr>
<tr>
<td><code>TCGA.modules(callback)</code></td>
<td>
Returns a list of loaded modules.<br />
<code>callback</code> is a function with two parameters, an error object and a string array of loaded modules.
</td>
</tr>
</tbody>
</table>
<h2>Find data</h2>
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td class="span5"><code>TCGA.find(query, callback)</code></td>
<td>
Queries the TCGA RDF file index.<br />
<code>query</code> is a SPARQL query string, <code>callback</code> a function with two parameters, an error object and an object representing the SPARQL query results in the <a href="http://www.w3.org/TR/sparql11-results-json/">SPARQL 1.1 Query Results JSON Format</a>.
</td>
</tr>
</tbody>
</table>
<h2>Get data</h2>
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td class="span5"><code>TCGA.get(url, callback)</code></td>
<td>
Downloads the contents of a file from <a href="https://tcga-data.nci.nih.gov/tcgafiles/ftp_auth/distro_ftpusers/anonymous/tumor/">TCGA's open-access HTTP directory</a> or any other data provider.<br />
<code>url</code> is a URL string, <code>callback</code> a function with two parameters, an error object and a string representing the contents of the requested file.
</td>
</tr>
<tr>
<td><code>TCGA.get.json(url, callback)</code></td>
<td>
Same as <code>TCGA.get</code>, but parses the downloaded file to JSON.<br />
<code>url</code> is a URL string, <code>callback</code> a function with two parameters, an error object and an object representing the contents of the requested file as JSON.
</td>
</tr>
<tr>
<td><code>TCGA.get.xml(url, callback)</code></td>
<td>
Same as <code>TCGA.get</code>, but parses the downloaded file to XML.<br />
<code>url</code> is a URL string, <code>callback</code> a function with two parameters, an error object and an object representing the contents of the requested file as XML.
</td>
</tr>
<tr>
<td><code>TCGA.get.sparql(url, callback)</code></td>
<td>
Same as <code>TCGA.get</code>, but parses the downloaded file to the <a href="http://www.w3.org/TR/sparql11-results-json/">SPARQL 1.1 Query Results JSON Format</a>.<br />
<code>url</code> is a URL string, <code>callback</code> a function with two parameters, an error object and an object representing the SPARQL query results as JSON.
</td>
</tr>
<tr>
<td><code>TCGA.get.range(url, startByte, endByte, callback)</code></td>
<td>
Same as <code>TCGA.get</code>, but downloads only a subset of the file within the specified byte range.<br />
<code>url</code> is a URL string, <code>startByte</code> and <code>endByte</code> the integer range of bytes to download, and <code>callback</code> a function with two parameters, an error object and a string representing the partial contents of the requested file.
</td>
</tr>
<tr>
<td><code>TCGA.get.archive(url, callback)</code></td>
<td>
Same as <code>TCGA.get</code>, but extracts the downloaded gzipped archive.<br />
<code>url</code> is a URL string, <code>callback</code> a function with two parameters, an error object and an object representing the contents of the requested archive.
</td>
</tr>
<tr>
<td><code>TCGA.get.barcodes(uuids, callback)</code></td>
<td>
Maps UUIDs to barcodes using the <a href="https://wiki.nci.nih.gov/display/TCGA/TCGA+Barcode+to+UUID+Web+Service+User's+Guide">TCGA Barcode to UUID Web Service</a>.<br />
<code>uuids</code> is an array of UUIDs, <code>callback</code> a function with two parameters, an error object and an object representing the mapping.
</td>
</tr>
<tr>
<td><code>TCGA.get.uuids(barcodes, callback)</code></td>
<td>
Maps barcodes to UUIDs using the <a href="https://wiki.nci.nih.gov/display/TCGA/TCGA+Barcode+to+UUID+Web+Service+User's+Guide">TCGA Barcode to UUID Web Service</a>.<br />
<code>barcodes</code> is an array of barcodes, <code>callback</code> a function with two parameters, an error object and an object representing the mapping.
</td>
</tr>
</tbody>
</table>
<h2>Store data</h2>
<table class="table table-bordered table-striped">
<p>
<span class="label label-info">Info</span>
We recommend to prefix all keys with the name of your module, e.g. <code>module:key</code>.
</p>
<tbody>
<tr>
<td class="span5"><code>TCGA.data.set(key, value, callback)</code></td>
<td>
Adds a key-value pair to the store.<br />
<code>key</code> is a string representing the key, <code>value</code> any type representing the value, and <code>callback</code> a function with one parameter, an error object.
</td>
</tr>
<tr>
<td><code>TCGA.data.get(key, callback)</code></td>
<td>
Retrieves a key-value pair from the store.<br />
<code>key</code> is a string representing the key, <code>callback</code> a function with two parameters, an error object and any type representing the value.
</td>
</tr>
<tr>
<td><code>TCGA.data.del(key, callback)</code></td>
<td>
Removes a key-value pair from the data.<br />
<code>key</code> is a string representing the key, <code>callback</code> a function with one parameter, an error object.
</td>
</tr>
<tr>
<td><code>TCGA.data.exists(key, callback)</code></td>
<td>
Checks if a key-value pair with the specified key exists in the store.<br />
<code>key</code> is a string representing the key, <code>callback</code> a function with two parameters, an error object and a boolean indicating if it is in the store or not.
</td>
</tr>
<tr>
<td><code>TCGA.data.keys(callback)</code></td>
<td>
Returns a list of all keys in the stores.<br />
<code>callback</code> is a function with two parameters, an error object and a string array of keys.
</td>
</tr>
<tr>
<td><code>TCGA.data.clear(callback)</code></td>
<td>
Removes all key-value pairs from the store.<br />
<code>callback</code> is a function with one parameter, an error object.
</td>
</tr>
</tbody>
</table>
<h2>User Interface</h2>
<h3>Load external stylesheets</h3>
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td class="span5"><code>TCGA.ui.loadStylesheet(url)</code></td>
<td>
Loads one or more external stylesheets using HTML link elements.<br />
<code>url</code> is a string or a string array of URLs.
</td>
</tr>
</tbody>
</table>
<h3>Register tab in main menu</h3>
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td class="span5"><code>TCGA.ui.registerTab(options, callback)</code></td>
<td>
Registers a tab in the menu bar of the TCGA Toolbox.<br />
<code>options</code> is an object with the following properties: <code>id</code> is a string representing the ID of the tab (we recommend to name it after your module), <code>title</code> is a string representing the title of your module, <code>content</code> is the HTML fragment describing the tab pane, and <code>switchTab</code> is a boolean indicating whether the TCGA Toolbox should immediately switch to your tab after it was created.<br />
<code>callback</code> is a function with two parameters, an error object and the DOM element of the created tab pane.
</td>
</tr>
</tbody>
</table>
<h3>Display notifications</h3>
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td class="span5"><code>TCGA.ui.toast.info(message, duration)</code></td>
<td>Displays an info notification with the specified string <code>message</code> for the specified <code>duration</code> in milliseconds.</td>
</tr>
<tr>
<td><code>TCGA.ui.toast.success(message, duration)</code></td>
<td>Displays a success notification with the specified string <code>message</code> for the specified <code>duration</code> in milliseconds.</td>
</tr>
<tr>
<td><code>TCGA.ui.toast.error(message, duration)</code></td>
<td>Displays an error notification with the specified string <code>message</code> for the specified <code>duration</code> in milliseconds.</td>
</tr>
</tbody>
</table>
</div>
<hr id="end-of-content" />
<footer>
<p>
University of Alabama at Birmingham<br />
Division of Informatics<br />
Department of Pathology<br />
<a href="http://uab.mathbiol.org/informatics">http://uab.mathbiol.org/informatics</a>
</p>
<p>
Contact: <a href="mailto:[email protected]">Alexander Grüneberg</a>
</p>
</footer>
</div>
<script src="lib/jquery.js"></script>
<script src="lib/ganglion/ganglion.js"></script>
<script src="lib/gzip.js"></script>
<script src="lib/tcga.js"></script>
<script src="lib/bootstrap.js"></script>
<script src="lib/gui.js"></script>
<script src="lib/analytics.js"></script>
</body>
</html>