Skip to content

Commit 1bb27a0

Browse files
committed
Merge branch 'master' into FIX_notebook_kernel
2 parents ec09019 + 91b95c4 commit 1bb27a0

14 files changed

+67
-63
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated by Neurodocker version 0.4.2-dev
2-
# Timestamp: 2018-10-09 20:28:32 UTC
2+
# Timestamp: 2018-10-09 19:14:50 UTC
33
#
44
# Thank you for using Neurodocker. If you discover any issues
55
# or ways to improve this software, please submit an issue or
@@ -126,7 +126,7 @@ RUN export PATH="/opt/miniconda-latest/bin:$PATH" \
126126
&& bash -c "source activate neuro \
127127
&& pip install --no-cache-dir \
128128
https://github.com/nipy/nipype/tarball/master \
129-
https://github.com/INCF/pybids/tarball/master \
129+
https://github.com/INCF/pybids/tarball/0.6.5 \
130130
nilearn \
131131
datalad[full] \
132132
nipy \
@@ -234,7 +234,7 @@ RUN echo '{ \
234234
\n ], \
235235
\n "pip_install": [ \
236236
\n "https://github.com/nipy/nipype/tarball/master", \
237-
\n "https://github.com/INCF/pybids/tarball/master", \
237+
\n "https://github.com/INCF/pybids/tarball/0.6.5", \
238238
\n "nilearn", \
239239
\n "datalad[full]", \
240240
\n "nipy", \

Singularity

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated by Neurodocker version 0.4.2-dev
2-
# Timestamp: 2018-10-09 20:28:34 UTC
2+
# Timestamp: 2018-10-09 19:14:51 UTC
33
#
44
# Thank you for using Neurodocker. If you discover any issues
55
# or ways to improve this software, please submit an issue or
@@ -116,7 +116,7 @@ sync && conda clean -tipsy && sync
116116
bash -c "source activate neuro
117117
pip install --no-cache-dir \
118118
https://github.com/nipy/nipype/tarball/master \
119-
https://github.com/INCF/pybids/tarball/master \
119+
https://github.com/INCF/pybids/tarball/0.6.5 \
120120
nilearn \
121121
datalad[full] \
122122
nipy \
@@ -228,7 +228,7 @@ echo '{
228228
\n ],
229229
\n "pip_install": [
230230
\n "https://github.com/nipy/nipype/tarball/master",
231-
\n "https://github.com/INCF/pybids/tarball/master",
231+
\n "https://github.com/INCF/pybids/tarball/0.6.5",
232232
\n "nilearn",
233233
\n "datalad[full]",
234234
\n "nipy",

docs/notebooks/resources_resources.html

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8451,15 +8451,15 @@
84518451
}
84528452
/* Flexible box model classes */
84538453
/* Taken from Alex Russell http://infrequently.org/2009/08/css-3-progress/ */
8454-
/* This file is a compatability layer. It allows the usage of flexible box
8454+
/* This file is a compatability layer. It allows the usage of flexible box
84558455
model layouts accross multiple browsers, including older browsers. The newest,
84568456
universal implementation of the flexible box model is used when available (see
8457-
`Modern browsers` comments below). Browsers that are known to implement this
8457+
`Modern browsers` comments below). Browsers that are known to implement this
84588458
new spec completely include:
84598459
84608460
Firefox 28.0+
84618461
Chrome 29.0+
8462-
Internet Explorer 11+
8462+
Internet Explorer 11+
84638463
Opera 17.0+
84648464
84658465
Browsers not listed, including Safari, are supported via the styling under the
@@ -11233,7 +11233,7 @@
1123311233
background: #f7f7f7;
1123411234
border-top: 1px solid #cfcfcf;
1123511235
border-bottom: 1px solid #cfcfcf;
11236-
/* This injects handle bars (a short, wide = symbol) for
11236+
/* This injects handle bars (a short, wide = symbol) for
1123711237
the resize handle. */
1123811238
}
1123911239
div#pager .ui-resizable-handle::after {
@@ -11676,7 +11676,7 @@
1167611676
.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
1167711677
</style>
1167811678
<style type="text/css">
11679-
11679+
1168011680
/* Temporary definitions which will become obsolete with Notebook release 5.0 */
1168111681
.ansi-black-fg { color: #3E424D; }
1168211682
.ansi-black-bg { background-color: #3E424D; }
@@ -11730,14 +11730,14 @@
1173011730
div.cell {
1173111731
display: block;
1173211732
page-break-inside: avoid;
11733-
}
11734-
div.output_wrapper {
11733+
}
11734+
div.output_wrapper {
1173511735
display: block;
11736-
page-break-inside: avoid;
11736+
page-break-inside: avoid;
1173711737
}
11738-
div.output {
11738+
div.output {
1173911739
display: block;
11740-
page-break-inside: avoid;
11740+
page-break-inside: avoid;
1174111741
}
1174211742
}
1174311743
</style>
@@ -11775,16 +11775,6 @@
1177511775
ga('create', 'UA-92929997-1', 'auto');
1177611776
ga('send', 'pageview');
1177711777

11778-
</script>
11779-
<script>
11780-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
11781-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
11782-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
11783-
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
11784-
11785-
ga('create', 'UA-92929997-1', 'auto');
11786-
ga('send', 'pageview');
11787-
1178811778
</script>
1178911779
</head>
1179011780
<body>
@@ -11796,14 +11786,15 @@
1179611786
<div class="inner_cell">
1179711787
<div class="text_cell_render border-box-sizing rendered_html">
1179811788
<h1 id="Helpful-Resources">Helpful Resources<a class="anchor-link" href="#Helpful-Resources">&#182;</a></h1><h2 id="Learn-more-about-Nipype">Learn more about Nipype<a class="anchor-link" href="#Learn-more-about-Nipype">&#182;</a></h2><ul>
11799-
<li><a href="http://nipype.readthedocs.io/en/latest/">Nipype homepage</a>: This is the best place to learn all you need to know about Nipype. For beginner's I recommend to check out the <a href="http://nipype.readthedocs.io/en/latest/quickstart.html">Quickstart</a> section.</li>
11789+
<li><a href="http://nipype.readthedocs.io/en/latest/">Nipype homepage</a>: This is the best place to learn all you need to know about Nipype. For beginner's, I recommend to check out the <a href="http://nipype.readthedocs.io/en/latest/quickstart.html">Quickstart</a> section.</li>
1180011790
<li><a href="http://miykael.github.io/nipype-beginner-s-guide/">Beginner's Guide</a>: This beginner's guide is an in-depth step by step tutorial to Nipype.</li>
1180111791
</ul>
1180211792
<h2 id="Neuroimaging">Neuroimaging<a class="anchor-link" href="#Neuroimaging">&#182;</a></h2><ul>
1180311793
<li><a href="http://www.fmri4newbies.com/tutorials/">fMRI 4 Newbies</a>: A crash course in brain imaging.</li>
1180411794
<li><a href="https://neurostars.org/">Neurostars.org</a>: If you have any questions about Neuroinformatics, this is the place to go! </li>
1180511795
<li><a href="http://imaging.mrc-cbu.cam.ac.uk/imaging/DesignEfficiency">Design efficiency in FMRI</a>: A nice and detailed guide on how to design a good fMRI study.</li>
1180611796
</ul>
11797+
<h2 id="Open-Science-Resources">Open Science Resources<a class="anchor-link" href="#Open-Science-Resources">&#182;</a></h2><p><a href="https://twitter.com/aya_ben_yakov">Aya Ben-Yakov</a> put together a very <a href="http://www.mrc-cbu.cam.ac.uk/openscience/resources/">nice and comprehensive list</a> of various tools and resources about open and reproducible science.</p>
1180711798
<h2 id="Learn-Python">Learn Python<a class="anchor-link" href="#Learn-Python">&#182;</a></h2><ul>
1180811799
<li><a href="http://python.swaroopch.com/">A Byte of Python</a>: A very nice introduction to Python in general.</li>
1180911800
<li><a href="http://nbviewer.jupyter.org/gist/rpmuller/5920182">A Crash Course in Python for Scientists</a>: a very good introduction to Python and scientific programming (e.g. Numpy, Scipy, Matplotlib)</li>
@@ -11829,7 +11820,7 @@ <h2 id="Learn-Unix-Shell">Learn Unix Shell<a class="anchor-link" href="#Learn-Un
1182911820
</div>
1183011821
</body><div class="h3" style="right:0;bottom:0;left:0;padding:1rem;text-align:center;"><p style="white-space:pre"><a href="https://miykael.github.io/nipype_tutorial/">Home</a>&emsp;|&emsp;<a href="https://github.com/miykael/nipype_tutorial">github</a>&emsp;|&emsp;<a href="http://nipype.readthedocs.io">Nipype</a></p></div>
1183111822

11832-
11823+
1183311824

1183411825

1183511826
</html>

generate.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ generate_docker() {
1717
conda_install="python=3.6 pytest jupyter jupyterlab jupyter_contrib_nbextensions
1818
traits pandas matplotlib scikit-learn scikit-image seaborn nbformat nb_conda" \
1919
pip_install="https://github.com/nipy/nipype/tarball/master
20-
https://github.com/INCF/pybids/tarball/master
20+
https://github.com/INCF/pybids/tarball/0.6.5
2121
nilearn datalad[full] nipy duecredit nbval" \
2222
create_env="neuro" \
2323
activate=True \
@@ -55,7 +55,7 @@ generate_singularity() {
5555
conda_install="python=3.6 pytest jupyter jupyterlab jupyter_contrib_nbextensions
5656
traits pandas matplotlib scikit-learn scikit-image seaborn nbformat nb_conda" \
5757
pip_install="https://github.com/nipy/nipype/tarball/master
58-
https://github.com/INCF/pybids/tarball/master
58+
https://github.com/INCF/pybids/tarball/0.6.5
5959
nilearn datalad[full] nipy duecredit nbval" \
6060
create_env="neuro" \
6161
activate=True \

notebooks/advanced_create_interfaces.ipynb

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,17 @@
7676
"metadata": {},
7777
"outputs": [],
7878
"source": [
79-
"import nibabel as nb\n",
80-
"%matplotlib inline\n",
81-
"nb.load('/data/ds000114/sub-01/ses-test/anat/sub-01_ses-test_T1w.nii.gz').orthoview();"
79+
"from nilearn.plotting import plot_anat\n",
80+
"%matplotlib inline"
81+
]
82+
},
83+
{
84+
"cell_type": "code",
85+
"execution_count": null,
86+
"metadata": {},
87+
"outputs": [],
88+
"source": [
89+
"plot_anat('/data/ds000114/sub-01/ses-test/anat/sub-01_ses-test_T1w.nii.gz', dim=-1);"
8290
]
8391
},
8492
{
@@ -123,7 +131,7 @@
123131
"metadata": {},
124132
"outputs": [],
125133
"source": [
126-
"nb.load('/data/ds000114/sub-01/ses-test/anat/sub-01_ses-test_T1w_bet.nii.gz').orthoview();"
134+
"plot_anat('/data/ds000114/sub-01/ses-test/anat/sub-01_ses-test_T1w_bet.nii.gz', dim=-1);"
127135
]
128136
},
129137
{
@@ -162,7 +170,7 @@
162170
"metadata": {},
163171
"outputs": [],
164172
"source": [
165-
"nb.load(res.outputs.out_file).orthoview();"
173+
"plot_anat(res.outputs.out_file, dim=-1);"
166174
]
167175
},
168176
{
@@ -686,7 +694,7 @@
686694
"metadata": {},
687695
"outputs": [],
688696
"source": [
689-
"nb.load(result.outputs.out_file).orthoview()"
697+
"plot_anat(result.outputs.out_file, dim=-1);"
690698
]
691699
},
692700
{
@@ -765,7 +773,7 @@
765773
"metadata": {},
766774
"outputs": [],
767775
"source": [
768-
"nb.load(orig_image).orthoview()"
776+
"plot_anat(orig_image, dim=-1);"
769777
]
770778
},
771779
{
@@ -774,7 +782,7 @@
774782
"metadata": {},
775783
"outputs": [],
776784
"source": [
777-
"nb.load('translated.nii.gz').orthoview()"
785+
"plot_anat('translated.nii.gz', dim=-1);"
778786
]
779787
},
780788
{
@@ -857,7 +865,7 @@
857865
"outputs": [],
858866
"source": [
859867
"# Plot the result\n",
860-
"nb.load('translated_functioninterface.nii.gz').orthoview()"
868+
"plot_anat('translated_functioninterface.nii.gz', dim=-1);"
861869
]
862870
},
863871
{
@@ -1096,7 +1104,7 @@
10961104
"metadata": {},
10971105
"outputs": [],
10981106
"source": [
1099-
"nb.load(result.outputs.out_file).orthoview()"
1107+
"plot_anat(result.outputs.out_file, dim=-1);"
11001108
]
11011109
},
11021110
{

notebooks/advanced_spmmcr.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"outputs": [],
1717
"source": [
1818
"from nipype.interfaces import spm\n",
19-
"matlab_cmd = '/opt/spm12-dev/run_spm12.sh /opt/matlabmcr-2018a/v94/ script'\n",
19+
"matlab_cmd = '/opt/spm12-dev/run_spm12.sh /opt/matlabmcr-2018b/v95/ script'\n",
2020
"spm.SPMCommand.set_mlab_paths(matlab_cmd=matlab_cmd, use_mcr=True)"
2121
]
2222
},

notebooks/basic_data_input_bids.ipynb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"metadata": {},
2626
"source": [
2727
"## The `layout` object and simple queries\n",
28-
"To begin working with pubids we need to initialize a layout object. We will need it to do all of our queries"
28+
"To begin working with pybids we need to initialize a layout object. We will need it to do all of our queries"
2929
]
3030
},
3131
{
@@ -34,7 +34,7 @@
3434
"metadata": {},
3535
"outputs": [],
3636
"source": [
37-
"from bids.grabbids import BIDSLayout\n",
37+
"from bids.layout import BIDSLayout\n",
3838
"layout = BIDSLayout(\"/data/ds000114/\")"
3939
]
4040
},
@@ -187,10 +187,10 @@
187187
},
188188
"outputs": [],
189189
"source": [
190-
"from bids.grabbids import BIDSLayout\n",
190+
"from bids.layout import BIDSLayout\n",
191191
"layout = BIDSLayout(\"/data/ds000114/\")\n",
192192
"\n",
193-
"[f.filename for f in layout.get(subject='02', task=\"linebisection\")]"
193+
"layout.get(subject='02', return_type='file', task=\"linebisection\")"
194194
]
195195
},
196196
{
@@ -209,7 +209,7 @@
209209
"source": [
210210
"def get_niftis(subject_id, data_dir):\n",
211211
" # Remember that all the necessary imports need to be INSIDE the function for the Function Interface to work!\n",
212-
" from bids.grabbids import BIDSLayout\n",
212+
" from bids.layout import BIDSLayout\n",
213213
" \n",
214214
" layout = BIDSLayout(data_dir)\n",
215215
" \n",
@@ -330,7 +330,7 @@
330330
"from nipype.interfaces.utility import IdentityInterface, Function\n",
331331
"\n",
332332
"def get_T1w(subject_id, data_dir):\n",
333-
" from bids.grabbids import BIDSLayout\n",
333+
" from bids.layout import BIDSLayout\n",
334334
" \n",
335335
" layout = BIDSLayout(data_dir)\n",
336336
" \n",
@@ -399,7 +399,7 @@
399399
"outputs": [],
400400
"source": [
401401
"def printMetadata(path, data_dir):\n",
402-
" from bids.grabbids import BIDSLayout\n",
402+
" from bids.layout import BIDSLayout\n",
403403
" layout = BIDSLayout(data_dir)\n",
404404
" print(\"\\n\\nanalyzing \" + path + \"\\nTR: \"+ str(layout.get_metadata(path)[\"RepetitionTime\"]) + \"\\n\\n\")\n",
405405
" \n",
@@ -454,7 +454,7 @@
454454
"def get_niftis(subject_id, data_dir):\n",
455455
" # Remember that all the necesary imports need to be INSIDE the function \n",
456456
" # for the Function Interface to work!\n",
457-
" from bids.grabbids import BIDSLayout\n",
457+
" from bids.layout import BIDSLayout\n",
458458
" \n",
459459
" layout = BIDSLayout(data_dir)\n",
460460
" \n",
@@ -481,7 +481,7 @@
481481
"source": [
482482
"# and now modify analyzeBOLD2\n",
483483
"def printMetadata_et(path, data_dir):\n",
484-
" from bids.grabbids import BIDSLayout\n",
484+
" from bids.layout import BIDSLayout\n",
485485
" layout = BIDSLayout(data_dir)\n",
486486
" print(\"\\n\\nanalyzing \" + path + \"\\nTR: \"+ \n",
487487
" str(layout.get_metadata(path)[\"RepetitionTime\"]) +\n",

notebooks/basic_data_output.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"source": [
77
"# Data Output\n",
88
"\n",
9-
"Similarly important to data input is data output. Using a data output module allows you to restructure and rename computed output and to spatial differentiate relevant output files from the temporary computed intermediate files in the working directory. Nipype provides the following modules to handle data stream output:\n",
9+
"Similarly important to data input is data output. Using a data output module allows you to restructure and rename computed output and to spatially differentiate relevant output files from the temporary computed intermediate files in the working directory. Nipype provides the following modules to handle data stream output:\n",
1010
"\n",
1111
" DataSink\n",
1212
" JSONFileSink\n",
@@ -274,7 +274,7 @@
274274
"cell_type": "markdown",
275275
"metadata": {},
276276
"source": [
277-
"As we can see, there is way too much content that we might not really care about. To relocate and rename all the files that are relevant to you, you can use `DataSink`?"
277+
"As we can see, there is way too much content that we might not really care about. To relocate and rename all the files that are relevant to you, you can use `DataSink`."
278278
]
279279
},
280280
{
@@ -368,7 +368,7 @@
368368
"cell_type": "markdown",
369369
"metadata": {},
370370
"source": [
371-
"This is already much better. But what if you want to rename the output files to represent something a bit readable. For this `DataSink` has the `substitution` input field.\n",
371+
"This is already much better. But what if you want to rename the output files to represent something a bit more readable. For this `DataSink` has the `substitution` input field.\n",
372372
"\n",
373373
"For example, let's assume we want to get rid of the string `'task-fingerfootlips'` and `'bold_mcf'` and that we want to rename the mean file, as well as adapt the file ending of the motion parameter file:"
374374
]
@@ -413,15 +413,15 @@
413413
"cell_type": "markdown",
414414
"metadata": {},
415415
"source": [
416-
"Cool, much more clearly!"
416+
"Cool, much clearer filenames!"
417417
]
418418
},
419419
{
420420
"cell_type": "markdown",
421421
"metadata": {},
422422
"source": [
423423
"### Exercise 1\n",
424-
"Create a simple workflow for skullstriping with FSL, the first node should use `BET` interface and the second node will be a ``DataSink``. Test two method of connecting the nodes and check the content of the output directory."
424+
"Create a simple workflow for skullstriping with FSL, the first node should use `BET` interface and the second node will be a ``DataSink``. Test two methods of connecting the nodes and check the content of the output directory."
425425
]
426426
},
427427
{

notebooks/basic_interfaces.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@
127127
"metadata": {},
128128
"outputs": [],
129129
"source": [
130-
"%%bash\n",
131-
"bet"
130+
"!bet"
132131
]
133132
},
134133
{

0 commit comments

Comments
 (0)