-
Notifications
You must be signed in to change notification settings - Fork 11
/
notebook.html
504 lines (449 loc) · 21.7 KB
/
notebook.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
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
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-107286198-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments)
};
gtag('js', new Date());
gtag('config', 'UA-107286198-1');
</script>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>SoS - Script of Script</title>
<!-- Bootstrap Core CSS -->
<link href="vendor/bootstrap/cosmo_css/bootstrap.min.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="https://use.fontawesome.com/releases/v5.0.6/css/all.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Droid+Sans:400,700" rel="stylesheet">
<!-- Theme CSS -->
<link href="css/testtab.css" rel="stylesheet">
<!-- <link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.4.2/tocbot.css">
-->
<style>
/* The Table of Contents container element */
#toc {
max-height: 90%;
overflow: auto;
margin-right: 4%;
width: 20%;
border: 1px solid #ccc;
webkit-border-radius: 6px;
moz-border-radius: 6px;
border-radius: 6px;
position: sticky;
float: left;
top: 100px;
}
/* The Table of Contents is composed of multiple nested unordered lists. These styles remove the default styling of an unordered list because it is ugly. */
#toc ul, #toc li {
list-style: none;
margin: 0;
padding: 0;
border: none;
line-height: 1.5em;
}
#toc > .toc-list {
overflow: hidden;
position: relative;
padding-left: 0px;
li {
list-style: none;
}
}
#toc > .toc-list > .toc-item > a {
padding-left: 10px;
}
.toc-list .toc-list a {
margin: 0;
padding-left: 15px;
font-size: 14px;
}
.toc-list .toc-list .toc-list a {
margin: 0;
padding-left: 30px;
font-size: 14px;
}
a.toc-link {
height: 100%;
}
.is-collapsible {
max-height: 1000px;
overflow: hidden;
transition: all 300ms ease-in-out;
}
.is-collapsed {
max-height: 0;
}
.is-position-fixed {
position: fixed !important;
top: 0;
}
/* Twitter Bootstrap Override Style */
.nav-list > li > a, .nav-list .nav-header {
margin: 0px;
}
.notebook-container {
box-shadow: none;
}
li.toc-item .is-active-link {
background-color: #6197d5;
color: white;
}
.nav > li > a:hover, .nav > li > a:focus {
text-decoration: none;
background-color: #eeeeee;
color: #337ab7;
}
h1::before, h2::before, h3::before, h4::before, h5::before, h6::before {
display: block;
content: " ";
height: 80px;
margin-top: -80px;
visibility: hidden;
}
.nav {
margin-bottom: 25px;
}
/* https://github.com/tscanlin/tocbot/issues/121 */
h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus, h7:focus {
outline: none !important;
box-shadow: none !important;
}
</style>
</head>
<body id="page-top" class="index">
<!-- Header -->
<header>
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="follow">
<ul class="list-inline gitbutton">
<li style="vertical-align: -3px;">
<form action="search.html" class="search-form">
<div class="form-group has-feedback">
<label for="search" class="sr-only">Search</label>
<input type="text" name="q" class="form-control" id="tipue_search_input" pattern=".{3,}" placeholder=" Search">
<span class="glyphicon glyphicon-search form-control-feedback"></span>
</div>
<div style="clear: both;"></div>
</form>
</li>
<li><a href="https://github.com/vatlab" target="_blank"><i class="fab fa-github fa-2x"></i></a>
</li>
</li>
<li><a href="https://vatlab.github.io/blog" target="_blank"><i class="fab fa-blogger-b fa-2x"></i></a>
</li>
<li>
<a href="https://twitter.com/bioworkflows" target="_blank">
<i class="fab fa-twitter fa-2x"></i>
</a>
</li>
<li><a href="https://gitter.im/vatlab/SoS" target="_blank"><i class="fab fa-gitter fa-2x"></i></a>
</li>
<li><a href="https://www.youtube.com/channel/UCPsumGZ-C2NddWO54CvEdSw/videos" target="_blank">
<i class="fab fa-youtube fa-2x"></i></a>
</li>
<li><a href="https://github.com/binder-examples/jupyter-sos" target="_blank">
<img src="img/binder_white.png" style="width:1.2em;height:1.2em;margin-bottom:0.4em"
onmouseover="this.src='img/binder.png';"
onmouseout="this.src='img/binder_white.png';" >
</a>
</li>
<li><a href="http://128.135.144.117:8000/" target="_blank"><i
class="fa fa-rocket fa-2x" ></i></a>
</li>
</ul>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="intro-text">
<div class="container-fluid">
<div class="row vertical-align">
<div class="header-size-styling intro-heading col-xs-4 col-sm-5 col-md-5 col-lg-5" id="left-word">SoS</div>
<span class="rotater-size-styling intro-heading col-xs-8 col-sm-7 col-md-7 col-lg-7" id="rotating_title"></span>
</div>
</div>
<div class="intro-lead-in">Notebook environment for both interactive data analysis and batch data processing</div>
</div>
</div>
</div>
</div>
</header>
<div id="exTab2" class="container">
<a name="content"></a>
<nav id="navigation">
<ul class="nav nav-tabs">
<li><a href="index.html#content">Introduction</a> </li>
<li><a href="running.html#content">Running SoS</a> </li>
<li class="active"><a href="notebook.html#content">SoS Notebook</a> </li>
<li><a href="workflow.html#content">SoS Workflow</a> </li>
</ul>
</nav>
<div id="toc" class="tocify"> </div><!--/.well -->
<div class="tab-content">
<div class="row-fluid">
<div class="col-xs-12 col-sm-5 col-md-4">
</div><!--/span-->
<div class="col-xs-12 col-sm-7 col-md-8 notebook-container">
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h1 id="Introductory-Videos">Introductory Videos<a class="anchor-link" href="#Introductory-Videos"></a></h1>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<div class="container">
<div class="row">
<div class="col-sm-3">
<div class="embed-responsive embed-responsive-16by9">
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/U75eKosFbp8?wmode=opaque" width="560"></iframe>
<div class="overlay-duration">45:56</div>
</div>
<p>Presentation at JupyterCon 18 <br/><a href="https://github.com/vatlab/JupyterCon2018">slides and examples</a></p>
</div>
<div class="col-sm-3">
<div class="embed-responsive embed-responsive-16by9">
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/xrwhNMRTBp4?wmode=opaque" width="560"></iframe>
<div class="overlay-duration">16:32</div>
</div>
<p>Overview of SoS Notebook<br/>
<a href="https://github.com/vatlab/sos-docs/tree/master/src/videos">Examples</a>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h1 id="Getting-help">Getting help<a class="anchor-link" href="#Getting-help"></a></h1>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>SoS Notebook comes with an extensive set of documentation but it can be daunting to dive into it to get the information you need.</p>
<ul>
<li><p>If you have a casual question like if certain feature exists or how certain things are handled, it is better to <a href="https://gitter.im/vatlab/SoS">ask it in our gitter channel</a>. You can also use the <i class="fab fa-gitter fa-2x"></i> button at the top right corner of the homepage.</p>
</li>
<li><p>If you have a more serious question or suggestion, please feel free to post to our <a href="https://github.com/vatlab/sos-notebook">issue tracker</a>. SoS consists of tens of modules and related issue trackers but free feel to post to any of them because it is easy for us to move the issue to an appropriate tracker if needed.</p>
</li>
</ul>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h1 id="Documentation">Documentation<a class="anchor-link" href="#Documentation"></a></h1>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Our documentation is hosted on our live server and can be edited directly. If you spot an error or feel like contributing to the document, please</p>
<ol>
<li>Click the <i class="fa fa-edit fa-2x"></i> button to the top right corner of each tutorial</li>
<li>Execute the notebook and edit it on our live server</li>
<li>Enter <code>!create-pr <Shift-Enter></code> in the console panel to send us a PR</li>
</ol>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Using-SoS-Notebook">Using SoS Notebook<a class="anchor-link" href="#Using-SoS-Notebook"></a></h2><ul>
<li><a href="doc/user_guide/multi_kernel_notebook.html">Using multiple kernels in one Jupyter noetbook</a></li>
<li><a href="doc/user_guide/expand_capture_render.html">Working with arbitrary subkernels (magics <code>%cd</code>, <code>%expand</code>, <code>%capture</code> and <code>%render</code>)</a></li>
<li><a href="doc/user_guide/exchange_variable.html">Exchanging data among kernels (magics <code>%get</code>, <code>%put</code>, <code>%use</code>, and <code>%with</code>)</a></li>
<li><a href="doc/user_guide/console_panel.html">Using the console panel (console panel and shortcut <code>Ctrl-Shift-Enter</code>)</a></li>
<li><a href="doc/user_guide/magic_preview.html">Previewing variables and files (magic <code>%preview</code>)</a></li>
<li><a href="doc/user_guide/sessioninfo_revision.html">Tracking session and revision history of notebooks (magic <code>%revisions</code> and <code>%sessioninfo</code>)</a></li>
<li><a href="doc/user_guide/magic_env.html">Running cell in modified environments (magic <code>%env</code>)</a></li>
<li><a href="doc/user_guide/rmd_to_ipynb.html">Converting RMarkdown files to SoS notebooks (<code>sos convert .rmd .ipynb</code>)</a></li>
<li><a href="doc/user_guide/magic_convert.html">Exporting reports in HTML format (magic <code>%convert</code>)</a></li>
<li><a href="doc/user_guide/magic_use.html">More on magic <code>%use</code></a></li>
<li><a href="doc/user_guide/workflow_magics.html">Workflow-execution magics (magics <code>%run</code>, <code>%sosrun</code>, <code>%runfile</code>)</a></li>
</ul>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Supported-languages">Supported languages<a class="anchor-link" href="#Supported-languages"></a></h2><ul>
<li><a href="doc/user_guide/sos_bash.html">Working with Bash and Zsh (module <code>sos-bash</code>)</a></li>
<li><a href="doc/user_guide/sos_javascript.html">Working with JavaScript and TypeScript (module <code>sos-javascript</code>)</a></li>
<li><a href="doc/user_guide/sos_julia.html">Working with Julia (module <code>sos-julia</code>)</a></li>
<li><a href="doc/user_guide/sos_matlab.html">Working with Matlab and Octave (module <code>sos-matlab</code>)</a></li>
<li><a href="doc/user_guide/sos_ruby.html">Working with Ruby (module <code>sos-ruby</code>)</a></li>
<li><a href="doc/user_guide/sos_python.html">Working with Python 2 and Python3 (module <code>sos-python</code>)</a></li>
<li><a href="doc/user_guide/sos_r.html">Working with R (module <code>sos-r</code>)</a></li>
<li><a href="doc/user_guide/sos_sas.html">Working with SAS (module <code>sos-sas</code>)</a></li>
<li><a href="doc/user_guide/sos_scilab.html">Working with Scilab (module <code>sos-scilab</code>)</a></li>
<li><a href="doc/user_guide/sos_stata.html">Working with Stata (module <code>sos-stata</code>)</a></li>
<li><a href="doc/user_guide/markdown_kernel.html">Uisng the markdown kernel (module <code>markdown-kernel</code>)</a></li>
</ul>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Technical-details">Technical details<a class="anchor-link" href="#Technical-details"></a></h2><ul>
<li><a href="doc/user_guide/sos_magics.html">SoS Magics</a></li>
<li><a href="doc/user_guide/language_module.html">Writing a new language module</a></li>
</ul>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h1 id="Examples">Examples<a class="anchor-link" href="#Examples"></a></h1><p>Jupyter notebook to demonstrate features of SoS</p>
<ul>
<li><a href="doc/examples/Types_of_cells.html">Types of cells</a> (<a href="doc/examples/Types_of_cells.ipynb">notebook</a>)<br/>
<small>Demonstrate four types of cells that can be included in a Jupyter notebook</small></li>
<li><img alt="No description has been provided for this image" src="img/R.png" style="width:16pt;height:16pt;margin-right:5pt;"/> <a href="doc/examples/DEG_Annotation.html">DEG Annotation</a> (<a href="doc/examples/DEG_Annotation.ipynb">notebook</a>)<br/>
<small>An example to use Python to read an excel file, transfer the data to R, use R to translate ensembl gene IDs to HGNC gene names, then transfer data back to Python to write to a separate excel file</small></li>
<li><img alt="No description has been provided for this image" src="img/R.png" style="width:16pt;height:16pt;margin-right:5pt;"/> <a href="doc/examples/Preview_and_Report_Generation.html">Generation of reports with hidden details</a> (<a href="doc/examples/Preview_and_Report_Generation.ipynb">notebook</a> and <a href="doc/examples/Preview_and_Report_Generation_report.html">generated report</a>)<br/>
<small>This example demonstrates how to generate a report in HTML format with hidden details</small></li>
<li><img alt="No description has been provided for this image" src="img/SAS.png" style="width:16pt;height:16pt;margin-right:5pt;"/><img alt="No description has been provided for this image" src="img/R.png" style="width:16pt;height:16pt;margin-right:5pt;"/> <a href="doc/examples/SAS_Example.html">Use SAS with SoS</a> (<a href="doc/examples/SAS_Example.ipynb">notebook</a>)<br/>
<small>Simple examples on using SAS with SoS</small></li>
</ul>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h1 id="Publications">Publications<a class="anchor-link" href="#Publications"></a></h1><p>Please cite the following publication if you use SoS Notebook for your work:</p>
<p><a href="https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/bty405/5001386"><strong>SoS Notebook: An Interactive Multi-Language Data Analysis Environment</strong></a>
<small>Bo Peng, Gao Wang, Jun Ma, Man Chong Leong, Chris Wakefield, James Melott, Yulun Chiu, Di Du, and John N. Weinstein, <em>Bioinformatics</em>, May 2018. doi: <a href="https://doi.org/10.1093/bioinformatics/bty405">https://doi.org/10.1093/bioinformatics/bty405</a></small></p>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="container-fluid footer-links">
<div class="row">
<div class="col col-sm-4">
<a href="https://www.mdanderson.org/" target="_blank"><img src="img/mdacc_boot_walk_mdacc_boot_walk_logo_hires.png" alt="The University of Texas MD Anderson
Cancer Center" height="75"></a>
</div>
<div class="col col-sm-4">
</div>
<div class="col col-sm-4">
<span class="copyright">Copyright © <a
href="http://faculty.mdanderson.org/Bo_Peng/Default.asp?SNID=0"
target="_blank">Bo Peng</a> and </span></br>
<span class="copyright"> <a href="http://www.mdanderson.org/research/departments-labs-institutes/departments-divisions/bioinformatics-and-computational-biology.html" target="_blank">
The University of Texas MD Anderson Cancer Center</a>
</span>
</br>
All Rights Reserved
<br>
Distributed under a <a href="https://opensource.org/licenses/BSD-3-Clause" target="_blank">3-clause BSD License</a>
</div>
</div>
</div>
</footer>
<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>
<!-- Bootstrap Core JavaScript -->
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<!-- Plugin JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<!-- Contact Form JavaScript -->
<script src="js/jqBootstrapValidation.js"></script>
<!-- <script src="js/contact_me.js"></script> -->
<!-- Theme JavaScript -->
<script src="js/agency.min.js"></script>
<script src="js/docs.js"></script>
<script src="js/sos_script.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.4.2/tocbot.min.js"></script>
<script>
var content = document.querySelector('.notebook-container')
var headings = content.querySelectorAll('h1, h2, h3, h4, h5, h6, h7')
var headingMap = {}
function indexedHeaders(headings) {
if (!headings) {
return '';
}
let counts = [0, 0, 0, 0, 0, 0, 0]
for (let i = 0; i < headings.length; ++i) {
++counts[parseInt(headings[i].tagName[1])-1]
}
// now, we remove the first 1 if it is the first tag, and if
// it has only one, and if it is not the only header
let first = counts.findIndex(x => x > 0);
console.log(first)
if (counts[first] == 1 && counts.reduce((a, b) => a + b, 0) != counts[first]
&& parseInt(headings[0].tagName[1]) === first + 1) {
counts[first] = 0;
}
//
return counts.map((x, idx) => x > 0 ? 'H' + (idx+1) : '').filter(x => x).join(',');
}
Array.prototype.forEach.call(headings, function(heading) {
var id = heading.id ? heading.id : heading.textContent.toLowerCase()
.split(' ').join('-').split(':').join('');
headingMap[id] = !isNaN(headingMap[id]) ? ++headingMap[id] : 0;
if (headingMap[id]) {
heading.id = id + '-' + headingMap[id]
} else {
heading.id = id
}
})
tocbot.init({
// Where to render the table of contents.
tocSelector: '#toc',
// Where to grab the headings to build the table of contents.
contentSelector: '.notebook-container',
// Which headings to grab inside of the contentSelector element.
headingSelector: indexedHeaders(headings),
//
listClass: 'toc-list',
extraListClasses: 'nav nav-list',
//
listItemClass: 'toc-item',
//
activeListItemClass: 'active',
//
orderedList: false,
//
scrollSmooth: true
});
</script>
</body>
</html>