-
Notifications
You must be signed in to change notification settings - Fork 11
/
running.html
994 lines (866 loc) · 50.5 KB
/
running.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
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
<!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 class="active"><a href="running.html#content">Running SoS</a> </li>
<li><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="Live-SoS-server">Live SoS server<a class="anchor-link" href="#Live-SoS-server"></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>If you are curious on what SoS and SoS Notebook are, you can try it out by clicking <a href="http://sosworkflows.com/">this link</a>. This will lead you to our live SoS server from which you can click <code>New</code> -> <code>SoS</code> and create a SoS Notebook with all supported languages except for two proprietary ones (<code>MATLAB</code> and <code>SAS</code>).</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">
<h1 id="SoS-Docker-Images">SoS Docker Images<a class="anchor-link" href="#SoS-Docker-Images"></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>If you are using docker, you can run SoS directly using command</p>
<pre><code>% docker run -it vatlab/sos:latest /bin/bash</code></pre>
<p>to enter a command prompt with sos command. More usefully, you can start a Jupyter server with <a href="https://www.r-project.org/">R</a> and <a href="https://github.com/IRkernel/IRkernel">IRkernel</a>, Julia, Python, and SoS kernels, and many Python and R modules for data sciencists using command</p>
<pre><code>% docker run -d -p 8888:8888 vatlab/sos-notebook</code></pre>
<p>After the docker is running in the background, you will need to find the URL to access the server from the output of the previous command, which can be obtained with command <code>docker logs</code> with the output of the previous command, e.g.</p>
<pre><code>% docker logs 8ada70223a073942b1dd6a6c882189a0b3fadf902b3ad87acbe37063a198d6b8
Execute the command: jupyter notebook
...
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=754a646651c82657725be887a1a2579ab69a702ba80ae4b3</code></pre>
<p>You can then enter the URL in the log message to a browser and start working with a complete SoS environment. You could also set up the docker image to disable password as discussed <a href="https://github.com/jupyter/docker-stacks/tree/master/scipy-notebook">here</a> but using a Jupyter server without password is strongly discouraged.</p>
<p>You can even use this docker image for your daily data analysis if you make your local directory available to the Jupyter server using command</p>
<pre><code>% docker run -d -p 8888:8888 -v $HOME:/home/jovyan/work vatlab/sos-notebook</code></pre>
<p>This command mounts your home directory (<code>$HOME</code>) to directory <code>work</code> under the home directory of the docker machine but you can mount any local directory to the docker image. This container is hosted at <a href="http://ec2-34-192-184-206.compute-1.amazonaws.com:8000/">our public Jupyter
server</a> from which you can open our sample notebooks and create your own notebooks without installing anything.</p>
<p><strong>Note</strong>: If you get an error message stating <code>Bind for 0.0.0.0:8888 failed: port is already allocated</code>, your local port <code>8888</code> is already taken by some other processes and you can use options such as <code>-p 9999:8888</code> to use another local port. Using a different port actually allows you to execute multiple instances of the docker image.</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">
<h1 id="Local-installation">Local installation<a class="anchor-link" href="#Local-installation"></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><p>SoS consists of two major parts, the <strong>SoS Workflow</strong> and <strong>SoS Notebook</strong>, each with a number of extension modules:</p>
<p><img src="doc/media/components.png" style="width:100%;"></p>
<p><strong>SoS Workflow Engine </strong></p>
<ul>
<li><a href="https://pypi.python.org/pypi/sos/"><strong><code>sos</code></strong></a>: SoS workflow engine with its command line interface</li>
<li><a href="https://pypi.python.org/pypi/sos-pbs/"><strong><code>sos-pbs</code></strong></a>: PBS task engine for Torch, Slurm, IBM LSF etc</li>
<li><a href="https://pypi.python.org/pypi/sos-rq/"><strong><code>sos-rq</code></strong></a>: <a href="http://python-rq.org/">rq</a> task engine for SoS</li>
<li><a href="https://pypi.python.org/pypi/sos-bioinfo/"><strong><code>sos-bioinfo</code></strong></a>: extension for bioinformatic applications</li>
</ul>
<p><strong> SoS Notebook </strong></p>
<ul>
<li><a href="https://pypi.python.org/pypi/sos-notebook/"><strong><code>sos-notebook</code></strong></a>: Core sos-notebook module</li>
<li><a href="https://pypi.python.org/pypi/sos-papermill/"><strong><code>sos-papermill</code></strong></a>: Papermill extension for command line execution of SoS notebooks</li>
<li><a href="https://pypi.python.org/pypi/sos-bash/"><strong><code>sos-bash</code></strong></a>: SoS extension for shell scripts</li>
<li><a href="https://pypi.python.org/pypi/sos-javascript"><strong><code>sos-javascript</code></strong></a>: SoS extension for <code>JavaScript</code> and <code>Node.js</code></li>
<li><a href="https://pypi.python.org/pypi/sos-julia/"><strong><code>sos-julia</code></strong></a>: SoS extension for <code>Julia</code></li>
<li><a href="https://pypi.python.org/pypi/sos-matlab/"><strong><code>sos-matlab</code></strong></a>: SoS extension for <code>MATLAB</code> and <code>Octave</code></li>
<li><a href="https://pypi.python.org/pypi/sos-python/"><strong><code>sos-python</code></strong></a>: SoS extension for <code>Python2</code> and <code>Python3</code></li>
<li><a href="https://pypi.python.org/pypi/sos-r/"><strong><code>sos-r</code></strong></a>: SoS extension for R</li>
<li><a href="https://pypi.python.org/pypi/sos-sas/"><strong><code>sos-sas</code></strong></a>: SoS extension for SAS</li>
<li><a href="https://pypi.python.org/pypi/sos-scilab/"><strong><code>sos-scilab</code></strong></a>: SoS extension for Scilab</li>
<li><a href="https://pypi.python.org/pypi/sos-stata/"><strong><code>sos-stata</code></strong></a>: SoS extension for Stata</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="Conda-installation">Conda installation<a class="anchor-link" href="#Conda-installation"></a></h2>
</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>If you are using a conda environment, you can install <code>sos</code>, <code>sos-notebook</code>, and its language modules, and required interpreters all from a conda environment. For example, you can install SoS Workflow with command</p>
<pre><code>conda install sos sos-pbs -c conda-forge</code></pre>
<p>and SoS Notebook with command</p>
<pre><code>conda install sos-notebook jupyterlab-sos sos-papermill -c conda-forge</code></pre>
<p>Here <code>jupyterlab-sos</code> is JupyterLab extension for SoS Notebook, and <code>sos-papermill</code> is a Papermill extension for running SoS notebooks in command line.</p>
<p>You can install language modules with commands such as</p>
<pre><code>conda install sos-r sos-python sos-bash -c conda-forge</code></pre>
<p>Note that conda strives to provide complete environments for you so</p>
<pre><code>conda install sos-r -c conda-forge</code></pre>
<p>will install <code>sos</code>, <code>sos-notebook</code>, the language module <code>sos-r</code>, and a complete R environment including <code>r-base</code> and <code>r-irkernel</code>, and required python module <code>feather-format</code> and R library <code>feather</code>.</p>
<p>Similarly,</p>
<pre><code>conda install sos-bash -c conda-forge</code></pre>
<p>will install <code>sos</code>, <code>sos-notebook</code>, the language module <code>sos-bash</code>, <a href="https://anaconda.org/conda-forge/bash"><code>bash</code></a> if under Linux or MacOSX, and <a href="https://anaconda.org/conda-forge/m2-bash"><code>m2-bash</code></a> if under windows.</p>
<p>If you would like to have the flexibility to use system <code>R</code> (or <code>bash</code> etc), you can install <code>sos-notebook</code>, its language modules and required libraries separately using <code>pip</code>.</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">
<h2 id="Non-conda-installation">Non-conda installation<a class="anchor-link" href="#Non-conda-installation"></a></h2>
</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">
<h3 id="SoS-Workflow">SoS Workflow<a class="anchor-link" href="#SoS-Workflow"></a></h3>
</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 supports Linux, Mac OSX, and Windows systems and requires <a href="https://www.python.org/">Python 3</a> (version 3.6 or later) so you will need to install Python 3 if you do not have it installed locally. We recommend <a href="https://www.continuum.io/downloads">anaconda Python</a> because it is a complete Python environment with many packages for scientific computing.</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">
<p>If you only need to use the command line interface of the SoS Workflow System (e.g. to execute workflows on a remote server), you can install it with command</p>
<pre><code>pip install sos</code></pre>
<p>If you need to submit PBS (Slurm, PBS, LSF, etc) jobs to a cluster system, you will need to install the <code>sos-pbs</code> module, using command</p>
<pre><code>pip install sos-pbs</code></pre>
<p>If you are using <code>vim</code>, you can use command</p>
<pre><code>python -m sos.install</code></pre>
<p>to install a <strong>vim extension</strong> of sos to enable syntax highlighting when editing <code>.sos</code> files.</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">
<h3 id="SoS-Notebook">SoS Notebook<a class="anchor-link" href="#SoS-Notebook"></a></h3>
</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 can be used as both a polyglot notebook and an IDE for the SoS workflow system. It should be installed locally, or on a server to which you access remotely with a browser.</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">
<p>After making sure that you have Python 3.6+ installed, you can install <code>sos-notebook</code> and extension modules with commands such as</p>
<pre><code>pip install sos-notebook
pip install sos-papermill
pip install sos-r</code></pre>
<p>After the installation of <code>sos-notebook</code>, you will need to register the sos kernel to Jupyter using command</p>
<pre><code>python -m sos_notebook.install</code></pre>
<p>After verifying the <code>sos</code> and the kernels you would like to use are in the output of</p>
<pre><code>jupyter kernelspec list</code></pre>
<p>you can start a Jupyter server with command</p>
<pre><code>jupyter notebook</code></pre>
<p>and choose <code>SoS</code> as the kernel for a new notebook. Please refer to <a href="doc/documentation/Notebook_Interface.html">Notebook Interface</a> of the SoS documentation for details.</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">
<p>Certain features of SoS Notebook require optional python modules. They are not required but recommended for a complete SoS environment. These modules include</p>
<ul>
<li><a href="https://pypi.org/project/graphviz/">graphviz</a>, <a href="https://pypi.org/project/imageio/">imageio</a>, and <a href="https://pypi.org/project/Pillow/">pillow</a> or <a href="https://pypi.org/project/PIL/">PIL</a> for the preview of <code>dot</code> files generated by the <code>-d</code> option of <code>sos run</code>.</li>
<li><a href="https://pypi.org/project/pysam/">pysam</a> for the preview of bam and sam files.</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">
<h3 id="SoS-extension-for-Jupyter-Lab">SoS extension for Jupyter Lab<a class="anchor-link" href="#SoS-extension-for-Jupyter-Lab"></a></h3>
</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><a href="https://jupyterlab.readthedocs.io/en/stable/">JupyterLab</a> is the next-generation web-based user interface for Project Jupyter. To use SoS with JupyterLab, you will need to install SoS Notebook (the <code>sos</code> kernel) and all language modules and supporting libraries, then install the JupyterLab extension of SoS called <a href="https://github.com/vatlab/jupyterlab-sos">jupyterlab-sos</a> following instructions <a href="https://github.com/vatlab/jupyterlab-sos">here</a>. Basically, you can</p>
<ul>
<li>install <code>transient-display-data</code> and <code>jupyterlab-sos</code> extensions from the JupyterLab extension manager</li>
<li>or from conda using command
<pre><code>conda install jupyterlab-sos -c conda-forge</code></pre>
if you are using a conda environment</li>
<li><p>or from command line using commands</p>
<pre><code>jupyter labextension install transient-display-data
jupyter labextension install jupyterlab-sos</code></pre>
</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="Supported-Languages">Supported Languages<a class="anchor-link" href="#Supported-Languages"></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>To use a language in <code>SoS</code>, your system should have the corresponding interpreters (<code>bash</code>, <code>python</code>, <code>julia</code>) and Jupyter kernel (e.g. <code>ir</code> for <code>R</code>, <code>ijavascript</code> for <code>JavaScript</code>) installed. The installation process varies from language to language, and can be quite troublesome depending on language and operating system.</p>
<p>If you are using <code>conda</code>, commands such as <code>conda install sos-r -c conda-forge</code> will install all needed modules. Otherwise, you should</p>
<ol>
<li>Verify the availability of an interpreter by executing the interpreter from a command line (e.g. run <code>julia</code> to check if <code>julia</code> is installed.</li>
<li>Install the jupyter kernel for the interpreter, and verify if the corresponding kernel is installed correctly by running
<pre><code>jupyter kernelspec list</code></pre>
</li>
<li>Start Jupyter, create a notebook with the kernel and check if you can use the kernel correctly.</li>
<li>Visit the language-specific sections below to install any required modules that are used for data exchange between SoS and the kernels.</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><a id="Bash"></a><img src="img/Bash.png" style="width:32pt;height:32pt;margin-right:15pt;">Bash</h2>
</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><code>bash</code> is generally available under Linux and MacOSX so you only need to install <a href="https://github.com/takluyver/bash_kernel">the Bash Kernel</a> or <a href="https://github.com/Calysto/calysto_bash">Calysto Bash kernel</a> for Jupyter.</p>
<p>If you are using windows, you can install <code>m2-bash</code> or <code>git-bash</code>. Since <a href="https://github.com/takluyver/bash_kernel">the Bash Kernel</a> does not support windows, <a href="https://github.com/Calysto/calysto_bash">Calysto Bash kernel</a> would be the only choice for this system.</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">
<h2><a id="JavaScript"></a><img src="img/JavaScript.png" style="width:32pt;height:32pt;margin-right:15pt;">JavaScript</h2>
</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>Although there appears to be several Jupyter Kernels, SoS is only tested with the <a href="https://github.com/n-riesco/ijavascript">iJavaScript kernel</a>. To use this kernel, please follow <a href="https://github.com/n-riesco/ijavascript">iJavaScript kernel homepage</a> to install <code>iJavaScript kernel</code>.</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">
<h2><a id="Julia"></a><img src="img/Julia.png" style="width:32pt;height:32pt;margin-right:15pt;">Julia</h2>
</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>Start <code>Julia</code> and install <a href="https://github.com/JuliaLang/IJulia.jl">iJulia</a> by following <a href="https://github.com/JuliaLang/IJulia.jl">iJulia Kernel homepage</a>. After that, install <a href="https://github.com/JuliaStats/Feather.jl">feather.jl</a>, <a href="https://github.com/JuliaData/DataFrames.jl">DataFrames.jl</a> and <a href="https://github.com/davidavdav/NamedArrays.jl">NamedArrays.jl</a> with commands</p>
<pre><code>using Pkg
Pkg.add("Feather")
Pkg.add("DataFrames")
Pkg.add("NamedArrays")</code></pre>
<p>Note that it is important to set</p>
<pre><code>ENV["JUPYTER"] = "/path/to/jupyter"</code></pre>
<p>in Julia before running</p>
<pre><code>Pkg.add("IJulia")</code></pre>
<p>so that <code>IJulia</code> can be installed to the existing installation of Jupyter.</p>
<p>Finally on the SoS side, the Python <a href="https://github.com/wesm/feather">feather-format</a> module should be installed, most likely with command</p>
<pre><code>conda install -c conda-forge feather-format</code></pre>
<p>to facilitate the exchange of data frames, and please do not forget to install the Julia language module</p>
<pre><code>pip install sos-julia</code></pre>
</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><a id="MATLAB"></a><img src="img/Matlab.png" style="width:32pt;height:32pt;margin-right:15pt;"> MATLAB</h2>
</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>Because <code>SoS</code> requires <code>Python 3.6</code> and only <code>MATLAB</code> version 2017b+ supports this version of <code>Python</code>, you will need to have a working version of <code>MATLAB 2017b</code> or later installed on your system. Then, you will need to install <a href="https://www.mathworks.com/help/matlab/matlab_external/install-the-matlab-engine-for-python.html">matlab engine for Python</a>, which
typically involves the execution of command <code>python setup.py install</code> under <code>matlabroot\extern\engines\python</code>.</p>
<p>Because of <a href="https://mathworksservicerequest.secure.force.com/apex/cp_case_detail?cc=us&id=5000Z00000tgPA0">a bug with usage statistics collection in MATLAB 2017b</a>, you will need to turn off MATLAB's usage statistics collection system before you use <code>MATLAB 2017b</code> with <code>SoS</code>. To resolve this issue, You can opt-out of usage statistics collection by using the following steps: On the <code>Home</code> tab, in the <code>Environment</code> section, click <code>Preferences</code>, then select <code>MATLAB</code> > <code>General</code> in the <code>Preferences</code> window. Uncheck the box <code>Improve MATLAB by sending user experience information to MathWorks</code>.</p>
<p>There are two different implementations of <code>MATLAB</code> kernels for Jupyter <a href="https://github.com/Calysto/matlab_kernel"><code>matlab_kernel</code></a> and <a href="https://github.com/imatlab/imatlab">imatlab</a>. Because of <a href="https://github.com/vatlab/sos-matlab/issues/2">a bug with <code>matlab_kernel</code></a>, you should install the <code>imatlab</code> kernel by following instructions on <a href="https://github.com/imatlab/imatlab">the imatlab homepage</a>.</p>
<p>Because <code>MATLAB</code> is among the most difficult languages to configure, we have recorded a video <a href="https://youtu.be/t9ohJZnuanc">Using MATLAB with SoS Notebook</a> with detailed instructions on how to configure SoS Notebook to work with MATLAB.</p>
<div class="container">
<div class="row">
<div class="col-sm-3">
<div class="embed-responsive embed-responsive-16by9">
<iframe width="560" height="315" src="https://www.youtube.com/embed/t9ohJZnuanc" frameborder="0" allowfullscreen></iframe>
</div>
</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">
<h2><a id="Octave"></a><img src="img/Octave.png" style="width:32pt;height:32pt;margin-right:15pt;"> Octave</h2>
</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>After installing octave, install the <a href="https://github.com/Calysto/octave_kernel">octave kernel</a> by following instructions on the <a href="https://github.com/Calysto/octave_kernel">octave kernel homepage</a>.</p>
<p>For transferring Python's DataFrame and its equivalences in other languages, you will need to install the <a href="https://octave.sourceforge.io/dataframe/index.html">dataframe</a> package using the following command:</p>
<pre><code>octave --eval 'pkg install -forge dataframe'</code></pre>
</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><a id="Python-2"></a><img src="img/Python.png" style="width:32pt;height:32pt;margin-right:15pt;"> Python 2</h2>
</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>If you still have Python 2.x installed on your system and would like to use it with <code>SoS</code>, you will need to</p>
<ul>
<li>Place executable <code>python2</code> or <code>python2.7</code> in your <code>$PATH</code> and use action <code>python2</code> for python2 scripts.</li>
<li>Install python2 kernel following directions <a href="http://ipython.readthedocs.io/en/stable/install/kernel_install.html">here</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><a id="Python-3"></a><img src="img/Python3.png" style="width:32pt;height:32pt;margin-right:15pt;">Python 3</h2>
</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>Jupyter comes with working <code>Python3</code> kernel so no further installation is needed.</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">
<h2><a id="R"></a><img src="img/R.png" style="width:32pt;height:32pt;margin-right:15pt;">R</h2>
</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>To use <code>R</code> with <code>SoS</code>, you will need to install the following components:</p>
<ul>
<li><a href="https://github.com/IRkernel/IRkernel">IRKernel</a> kernel for Jupyter.</li>
<li>R <a href="https://cran.r-project.org/web/packages/arrow/index.html">arrow</a> library.</li>
<li>Python <a href="https://arrow.apache.org/docs/python/">pyarrow</a> module, which can be installed with command
<pre><code> conda install -c conda-forge pyarrow</code></pre>
</li>
</ul>
<p>If you have a working <code>R</code> installation, you can install <code>irkernel</code> and <code>arrow</code> in <code>R</code> with commands</p>
<pre><code>install.packages('IRkernel')
IRkernel::installspec()
install.packages('arrow')</code></pre>
<p>If you are using anaconda and do not have <code>R</code> installed, you can install <code>R</code> and required packages using commands</p>
<pre><code>conda install -c r r-essentials r-arrow
conda install -c conda-forge pyarrow</code></pre>
</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><a id="Ruby"></a><img src="img/Ruby.png" style="width:32pt;height:32pt;margin-right:15pt;">Ruby</h2>
</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>To use Ruby with SoS, you will need to install <a href="https://github.com/SciRuby/iruby">iRuby</a> by following <a href="https://github.com/SciRuby/iruby">iRuby Kernel homepage</a>. After that, install <a href="https://github.com/SciRuby/daru">daru</a> and <a href="https://github.com/SciRuby/nmatrix">NMatrix</a> with command:</p>
<pre><code>gem install daru nmatrix</code></pre>
</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><a id="SAS"></a><img src="img/SAS.png" style="width:32pt;height:32pt;margin-right:15pt;">SAS</h2>
</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>With a local or remote <code>SAS</code> installation of version 9.4 or higher, you will need to install <a href="https://github.com/sassoftware/sas_kernel"><code>sas-kernel</code></a> and configure it to connect it to your <code>SAS</code> installation.</p>
<p><strong>Note:</strong></p>
<ol>
<li>You will need SAS version 9.4 or higher to use <code>sas_kernel</code>.</li>
<li>The SAS Unversity Edition runs a jupyter server inside a Virtual Machine without ssh access. Although you can use this version to learn SAS and Jupyter, it is not possible to use it with SoS.</li>
</ol>
<p><strong>Note for Windows Users:</strong></p>
<ol>
<li>Please follow the guideline for <a href="https://sassoftware.github.io/saspy/install.html#configuration">configuration</a>. The integrated object method (IOM) connection method is the only option for Windows. </li>
<li>The paths of <code>classpath</code> in sascfg.py (sascfg_personal.py) might need to be updated manually.</li>
<li>In sascfg.py (sascfg_personal.py), please change <code>SAS_config_names</code> to a list only containing one option that you want to use. You cannot choose the <code>SAS_config_names</code> in <code>sos_notebook</code>. For example, if winlocal is your choice, then simply change the code to <code>SAS_config_names = ['winlocal']</code>. </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><a id="Scilab"></a><img src="img/scilab.png" style="width:32pt;height:32pt;margin-right:15pt;">Scilab</h2>
</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>You will need to install <a href="https://www.scilab.org/">Scilab</a> and then the <a href="https://github.com/Calysto/scilab_kernel">scilab_kernel</a>.</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">
<h2><a id="Stata"></a><img src="img/Stata.jpg" style="width:32pt;height:32pt;margin-right:15pt;">Stata</h2>
</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>You will need to install <a href="https://www.stata.com/">Stata</a> and then the <a href="https://github.com/kylebarron/stata_kernel">stata_kernel</a>.</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">
<h2><a id="TypeScript"></a><img src="img/TypeScript.png" style="width:32pt;height:32pt;margin-right:15pt;">TypeScript</h2>
</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>After installing <a href="https://www.npmjs.com/"><code>npm</code></a>, <a href="https://www.typescriptlang.org/"><code>typescript</code></a>, you should install the <a href="https://github.com/nearbydelta/itypescript">iTypeScript kernel</a>.</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">
<h2><a id="Zsh"></a><img src="img/zsh.png" style="width:32pt;height:32pt;margin-right:15pt;">Zsh</h2>
</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><code>zsh</code> is generally available under Linux and MacOSX so you only need to install <a href="https://github.com/danylo-dubinin/zsh-jupyter-kernel">the zsh Kernel</a> for Jupyter, and then the <a href="https://github.com/vatlab/sos-bash"><code>sos-bash</code></a> language module, which supports both <code>bash</code> and <code>zsh</code>.</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">
<h1 id="Notes">Notes<a class="anchor-link" href="#Notes"></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">
<h2 id="Remote-access">Remote access<a class="anchor-link" href="#Remote-access"></a></h2>
</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>One of the advantages of using a Jupyter notebook is the ability to access the notebook remotely. For example, you can start a Jupyter server from your office computer and connect to it from you home (as long as there is no firewall that blocks the assigned port).</p>
<p><a href="http://jupyter-notebook.readthedocs.io/en/latest/public_server.html">The jupyter documentation</a> provides detailed instructions on how to start a Jupyter notebook server that accepts external connection. Generally speaking, you should run command</p>
<div class="highlight"><pre><span></span><span class="o">>>></span> <span class="kn">from</span> <span class="nn">notebook.auth</span> <span class="kn">import</span> <span class="n">passwd</span>
<span class="o">>>></span> <span class="n">passwd</span><span class="p">()</span>
</pre></div>
<p>from a Python shell to get <code>sha</code> presentation of a password. Generate a new configuration file (<code>~/.jupyter/jupyter_notebook_config.py</code>) with command</p>
<pre><code>jupyter notebook --generate-config</code></pre>
<p>and modify it with lines such as</p>
<div class="highlight"><pre><span></span><span class="n">c</span><span class="o">.</span><span class="n">NotebookApp</span><span class="o">.</span><span class="n">ip</span> <span class="o">=</span> <span class="s1">'*'</span>
<span class="n">c</span><span class="o">.</span><span class="n">NotebookApp</span><span class="o">.</span><span class="n">password</span> <span class="o">=</span> <span class="sa">u</span><span class="s1">'sha1:...<your hashed password here>'</span>
<span class="n">c</span><span class="o">.</span><span class="n">NotebookApp</span><span class="o">.</span><span class="n">open_browser</span> <span class="o">=</span> <span class="kc">False</span>
<span class="n">c</span><span class="o">.</span><span class="n">NotebookApp</span><span class="o">.</span><span class="n">port</span> <span class="o">=</span> <span class="mi">8888</span>
</pre></div>
<p>Then, after you start your notebook server using command</p>
<pre><code>jupyter notebook</code></pre>
<p>You should be able to access it remotely with URL</p>
<pre><code>http://url-or-ip-of-notebook-server:8888/</code></pre>
</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="virtualenv-or-pipenv"><code>virtualenv</code> or <code>pipenv</code><a class="anchor-link" href="#virtualenv-or-pipenv"></a></h2>
</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>If you are using virtualenv or pipenv, you might need to remove the <code>sos</code> kernel installed globally with command</p>
<pre><code>jupyter kernelspec remove sos
python -m sos_notebook.install</code></pre>
<p>to install sos for the particular <code>python</code> interpreter of the virtual env.</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">
<h2 id="Windows">Windows<a class="anchor-link" href="#Windows"></a></h2>
</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>Windows systems lack native support for some of the tools that SoS uses and it is generally more difficult to set up Jupyter kernels for different languages. We therefore do not recommend the use of SoS and SoS Notebook under windows for novice users.</p>
<p>The best way to use SoS under windows is to use a Linux subsystem. You could enable <a href="https://msdn.microsoft.com/en-us/commandline/wsl/about">Linux subsystem for windows</a> if you have a Windows 10 system with Developer Mode enabled, or use one of the Linux subsystems such as <a href="https://www.cygwin.com/">Cygwin</a>, <a href="http://www.mingw.org/">MinGW</a>, or <a href="http://www.msys2.org/">MSYS2</a>. We generally recommend the use of MSYS2 because of its pacman package manage system.</p>
<p>To install MSYS2,</p>
<ul>
<li>Install MSYS2 from <a href="http://www.msys2.org/">MSYS2 homepage</a></li>
<li>Start MSYS2, run
<pre><code>pacman -S openssh rsync git</code></pre>
</li>
<li>Add <code>c:\msys64\usr\bin</code> (adapt to your installation) to environment variable <code>$PATH</code> so that commands <code>rsync</code>, <code>rcp</code>, <code>ssh</code>, and <code>git</code> are available to sos.</li>
</ul>
<p>Note that</p>
<ul>
<li>This configuration allows executing tasks generated from a windows localhost on remote Linux and Mac OSX hosts (task queues). <strong>Remote execution on a windows host is not yet supported</strong>. </li>
<li>Installation of <code>git</code> is optional especially if you already have <a href="https://git-scm.com/downloads">git for windows</a> installed (which is also based on msys2).</li>
<li>You might want to install <a href="https://conemu.github.io/">ConEmu</a> as a (much better) replacement for Windows command console.</li>
<li>You will need to set up <code>$HOME</code> properly to use ssh and public key authentication with other machines. <a href="https://github.com/valtron/llvm-stuff/wiki/Set-up-Windows-dev-environment-with-MSYS2">This page</a> provides a nice summary of the steps.</li>
</ul>
</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>