Skip to content

Commit fb79469

Browse files
committed
ENH: restricts datalad download and 'Basic' notebooks to sub-01
1 parent ced8dc7 commit fb79469

9 files changed

+85
-147
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# pull request on our GitHub repository:
66
# https://github.com/kaczmarj/neurodocker
77
#
8-
# Timestamp: 2018-03-17 00:20:22
8+
# Timestamp: 2018-03-20 12:07:05
99

1010
FROM neurodebian:stretch-non-free
1111

@@ -142,7 +142,7 @@ RUN mkdir /output && chmod 777 /output && chmod a+s /output
142142
USER neuro
143143

144144
# User-defined BASH instruction
145-
RUN bash -c "source activate neuro && cd /data && datalad install -r ///workshops/nih-2017/ds000114 && cd ds000114 && datalad get -r sub-*/ses-test/anat sub-*/ses-test/func/*fingerfootlips*"
145+
RUN bash -c "source activate neuro && cd /data && datalad install -r ///workshops/nih-2017/ds000114 && cd ds000114 && datalad get -r sub-01/ses-test/anat sub-01/ses-test/func/*fingerfootlips*"
146146

147147
COPY [".", "/home/neuro/nipype_tutorial"]
148148

@@ -241,7 +241,7 @@ RUN echo '{ \
241241
\n ], \
242242
\n [ \
243243
\n "run_bash", \
244-
\n "source activate neuro && cd /data && datalad install -r ///workshops/nih-2017/ds000114 && cd ds000114 && datalad get -r sub-*/ses-test/anat sub-*/ses-test/func/*fingerfootlips*" \
244+
\n "source activate neuro && cd /data && datalad install -r ///workshops/nih-2017/ds000114 && cd ds000114 && datalad get -r sub-01/ses-test/anat sub-01/ses-test/func/*fingerfootlips*" \
245245
\n ], \
246246
\n [ \
247247
\n "copy", \
@@ -273,6 +273,6 @@ RUN echo '{ \
273273
\n ] \
274274
\n ] \
275275
\n ], \
276-
\n "generation_timestamp": "2018-03-17 00:20:22", \
276+
\n "generation_timestamp": "2018-03-20 12:07:05", \
277277
\n "neurodocker_version": "0.3.2" \
278278
\n}' > /neurodocker/neurodocker_specs.json

create_dockerfile.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ docker run --rm kaczmarj/neurodocker:master generate -b neurodebian:stretch-non-
2121
--run 'mkdir /data && chmod 777 /data && chmod a+s /data' \
2222
--run 'mkdir /output && chmod 777 /output && chmod a+s /output' \
2323
--user=neuro \
24-
--run-bash 'source activate neuro && cd /data && datalad install -r ///workshops/nih-2017/ds000114 && cd ds000114 && datalad get -r sub-*/ses-test/anat sub-*/ses-test/func/*fingerfootlips*' \
24+
--run-bash 'source activate neuro && cd /data && datalad install -r ///workshops/nih-2017/ds000114 && cd ds000114 && datalad get -r sub-01/ses-test/anat sub-01/ses-test/func/*fingerfootlips*' \
2525
--copy . "/home/neuro/nipype_tutorial" \
2626
--user=root \
2727
--run 'chown -R neuro /home/neuro/nipype_tutorial' \

notebooks/basic_data_input.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@
409409
"source": [
410410
"As you can see, now `anat` contains ten file paths, T1w images for all ten subject. \n",
411411
"\n",
412-
"As a side node, you could also use ``[]`` string formating for some simple cases, e.g. \n",
412+
"As a side node, you could also use ``[]`` string formating for some simple cases, e.g. for loading only subject 1 adn 2: \n",
413413
"\n",
414414
" 'sub-0[1,2]/ses-test/anat/sub-0[1,2]_ses-test_T1w.nii.gz'"
415415
]
@@ -622,7 +622,7 @@
622622
"name": "python",
623623
"nbconvert_exporter": "python",
624624
"pygments_lexer": "ipython3",
625-
"version": "3.6.3"
625+
"version": "3.6.4"
626626
}
627627
},
628628
"nbformat": 4,

notebooks/basic_data_output.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@
303303
"\n",
304304
"# Skullstrip process\n",
305305
"ex1_skullstrip = Node(BET(mask=True), name=\"ex1_skullstrip\")\n",
306-
"ex1_skullstrip.inputs.in_file = \"/data/ds000114/sub-02/ses-test/anat/sub-02_ses-test_T1w.nii.gz\""
306+
"ex1_skullstrip.inputs.in_file = \"/data/ds000114/sub-01/ses-test/anat/sub-01_ses-test_T1w.nii.gz\""
307307
]
308308
},
309309
{
@@ -403,7 +403,7 @@
403403
"name": "python",
404404
"nbconvert_exporter": "python",
405405
"pygments_lexer": "ipython3",
406-
"version": "3.6.3"
406+
"version": "3.6.4"
407407
}
408408
},
409409
"nbformat": 4,

notebooks/basic_error_and_crashes.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@
302302
"from nipype.pipeline.engine import Node\n",
303303
"\n",
304304
"files = ['/data/ds000114/sub-01/ses-test/func/sub-01_ses-test_task-fingerfootlips_bold.nii.gz',\n",
305-
" '/data/ds000114/sub-02/ses-test/func/sub-02_ses-test_task-fingerfootlips_bold.nii.gz']\n",
305+
" '/data/ds000114/sub-01/ses-test/func/sub-01_ses-test_task-fingerfootlips_bold.nii.gz']\n",
306306
"\n",
307307
"gunzip = Node(Gunzip(), name='gunzip',)\n",
308308
"\n",
@@ -690,7 +690,7 @@
690690
"name": "python",
691691
"nbconvert_exporter": "python",
692692
"pygments_lexer": "ipython3",
693-
"version": "3.6.3"
693+
"version": "3.6.4"
694694
}
695695
},
696696
"nbformat": 4,

notebooks/basic_interfaces_caching.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
"metadata": {},
6363
"outputs": [],
6464
"source": [
65-
"bet_mem(in_file=\"/data/ds000114/sub-02/ses-test/anat/sub-02_ses-test_T1w.nii.gz\",\n",
66-
" out_file=\"/output/sub-02_T1w_brain.nii.gz\",\n",
65+
"bet_mem(in_file=\"/data/ds000114/sub-01/ses-test/anat/sub-01_ses-test_T1w.nii.gz\",\n",
66+
" out_file=\"/output/sub-01_T1w_brain.nii.gz\",\n",
6767
" mask=True)"
6868
]
6969
},
@@ -96,8 +96,8 @@
9696
"metadata": {},
9797
"outputs": [],
9898
"source": [
99-
"bet_mem(in_file=\"/data/ds000114/sub-02/ses-test/anat/sub-02_ses-test_T1w.nii.gz\",\n",
100-
" out_file=\"/output/sub-02_T1w_brain.nii.gz\",\n",
99+
"bet_mem(in_file=\"/data/ds000114/sub-01/ses-test/anat/sub-01_ses-test_T1w.nii.gz\",\n",
100+
" out_file=\"/output/sub-01_T1w_brain.nii.gz\",\n",
101101
" mask=True)"
102102
]
103103
},
@@ -117,8 +117,8 @@
117117
"outputs": [],
118118
"source": [
119119
"mem.clear_runs_since()\n",
120-
"bet_mem(in_file=\"/data/ds000114/sub-02/ses-test/anat/sub-02_ses-test_T1w.nii.gz\",\n",
121-
" out_file=\"/output/sub-02_T1w_brain.nii.gz\",\n",
120+
"bet_mem(in_file=\"/data/ds000114/sub-01/ses-test/anat/sub-01_ses-test_T1w.nii.gz\",\n",
121+
" out_file=\"/output/sub-01_T1w_brain.nii.gz\",\n",
122122
" mask=True)"
123123
]
124124
},
@@ -162,7 +162,7 @@
162162
"name": "python",
163163
"nbconvert_exporter": "python",
164164
"pygments_lexer": "ipython3",
165-
"version": "3.6.3"
165+
"version": "3.6.4"
166166
}
167167
},
168168
"nbformat": 4,

notebooks/basic_mapnodes.ipynb

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,9 @@
151151
"from nipype.interfaces.spm import Realign\n",
152152
"from nipype.pipeline.engine import Node, MapNode, Workflow\n",
153153
"\n",
154+
"# Here we specify a list of files (for this tutorial, we just add the same file twice)\n",
154155
"files = ['/data/ds000114/sub-01/ses-test/func/sub-01_ses-test_task-fingerfootlips_bold.nii.gz',\n",
155-
" '/data/ds000114/sub-02/ses-test/func/sub-02_ses-test_task-fingerfootlips_bold.nii.gz']\n",
156+
" '/data/ds000114/sub-01/ses-test/func/sub-01_ses-test_task-fingerfootlips_bold.nii.gz']\n",
156157
"\n",
157158
"realign = Node(Realign(register_to_mean=True),\n",
158159
" name='motion_correction')"
@@ -188,7 +189,7 @@
188189
"metadata": {},
189190
"source": [
190191
"```bash\n",
191-
"TraitError: The 'in_file' trait of a GunzipInputSpec instance must be an existing file name, but a value of ['/data/ds102/sub-01/func/sub-01_task-flanker_run-1_bold.nii.gz', '/data/ds102/sub-01/func/sub-01_task-flanker_run-2_bold.nii.gz'] <type 'list'> was specified.\n",
192+
"TraitError: The 'in_file' trait of a GunzipInputSpec instance must be an existing file name, but a value of ['/data/ds000114/sub-01/ses-test/func/sub-01_ses-test_task-fingerfootlips_bold.nii.gz', '/data/ds000114/sub-01/ses-test/func/sub-01_ses-test_task-fingerfootlips_bold.nii.gz'] <class 'list'> was specified.\n",
192193
"```"
193194
]
194195
},
@@ -232,7 +233,7 @@
232233
{
233234
"cell_type": "markdown",
234235
"metadata": {
235-
"solution2": "hidden",
236+
"solution2": "shown",
236237
"solution2_first": true
237238
},
238239
"source": [
@@ -252,7 +253,7 @@
252253
"cell_type": "code",
253254
"execution_count": null,
254255
"metadata": {
255-
"solution2": "hidden"
256+
"solution2": "shown"
256257
},
257258
"outputs": [],
258259
"source": [
@@ -304,7 +305,7 @@
304305
{
305306
"cell_type": "markdown",
306307
"metadata": {
307-
"solution2": "hidden"
308+
"solution2": "shown"
308309
},
309310
"source": [
310311
"let's print all nodes:"
@@ -314,7 +315,7 @@
314315
"cell_type": "code",
315316
"execution_count": null,
316317
"metadata": {
317-
"solution2": "hidden"
318+
"solution2": "shown"
318319
},
319320
"outputs": [],
320321
"source": [
@@ -324,7 +325,7 @@
324325
{
325326
"cell_type": "markdown",
326327
"metadata": {
327-
"solution2": "hidden"
328+
"solution2": "shown"
328329
},
329330
"source": [
330331
"the final result should be 10:"
@@ -334,7 +335,7 @@
334335
"cell_type": "code",
335336
"execution_count": null,
336337
"metadata": {
337-
"solution2": "hidden"
338+
"solution2": "shown"
338339
},
339340
"outputs": [],
340341
"source": [
@@ -344,7 +345,7 @@
344345
{
345346
"cell_type": "markdown",
346347
"metadata": {
347-
"solution2": "hidden"
348+
"solution2": "shown"
348349
},
349350
"source": [
350351
"we can also check the results of two other nodes:"
@@ -354,7 +355,7 @@
354355
"cell_type": "code",
355356
"execution_count": null,
356357
"metadata": {
357-
"solution2": "hidden"
358+
"solution2": "shown"
358359
},
359360
"outputs": [],
360361
"source": [
@@ -389,7 +390,7 @@
389390
"name": "python",
390391
"nbconvert_exporter": "python",
391392
"pygments_lexer": "ipython3",
392-
"version": "3.6.3"
393+
"version": "3.6.4"
393394
}
394395
},
395396
"nbformat": 4,

notebooks/basic_nodes.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171
"outputs": [],
172172
"source": [
173173
"# Specify node inputs\n",
174-
"bet.inputs.in_file = '/data/ds000114/sub-02/ses-test/anat/sub-02_ses-test_T1w.nii.gz'\n",
174+
"bet.inputs.in_file = '/data/ds000114/sub-01/ses-test/anat/sub-01_ses-test_T1w.nii.gz'\n",
175175
"bet.inputs.out_file = '/output/node_T1w_bet.nii.gz'"
176176
]
177177
},
@@ -231,7 +231,7 @@
231231
"\n",
232232
"# Define a node\n",
233233
"smooth_node = Node(IsotropicSmooth(), name=\"smoothing\")\n",
234-
"smooth_node.inputs.in_file = '/data/ds000114/sub-02/ses-test/anat/sub-02_ses-test_T1w.nii.gz'\n",
234+
"smooth_node.inputs.in_file = '/data/ds000114/sub-01/ses-test/anat/sub-01_ses-test_T1w.nii.gz'\n",
235235
"smooth_node.inputs.fwhm = 4\n",
236236
"smooth_node.inputs.out_file = '/output/node_T1w_smooth.nii.gz'\n",
237237
"smooth_res = smooth_node.run()\n"
@@ -300,7 +300,7 @@
300300
"name": "python",
301301
"nbconvert_exporter": "python",
302302
"pygments_lexer": "ipython3",
303-
"version": "3.6.3"
303+
"version": "3.6.4"
304304
}
305305
},
306306
"nbformat": 4,

0 commit comments

Comments
 (0)