Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Nipype-SPM fMRI Analysis

Run this notebook

Subject and Group Level Analysis Workflows

Date: 13 June 2024

License:

MIT License

Note: If this notebook uses neuroimaging tools from Neurocontainers, those tools retain their original licenses. Please see Neurodesk citation guidelines for details.

Citation and Resources:

Tools included in this workflow

Nipype:

  • Esteban, O., Markiewicz, C. J., Burns, C., Goncalves, M., Jarecka, D., Ziegler, E., Berleant, S., Ellis, D. G., Pinsard, B., Madison, C., Waskom, M., Notter, M. P., Clark, D., Manhães-Savio, A., Clark, D., Jordan, K., Dayan, M., Halchenko, Y. O., Loney, F., … Ghosh, S. (2025). nipy/nipype: 1.8.6 (1.8.6). Zenodo. Esteban et al. (2025)

SPM12:

  • Friston, K. J. (2007). Statistical parametric mapping: The analysis of functional brain images (1st ed). Elsevier / Academic Press.

  • Online Book

Dataset

  • Wakeman, DG and Henson, RN (2021). Multisubject, multimodal face processing. OpenNeuro. [Dataset] doi: 10.18112/openneuro.ds000117.v1.0.5

  • Wakeman, D.G. & Henson, R.N. (2015). A multi-subject, multi-modal human neuroimaging dataset. Sci. Data 2:150001 doi: 10.1038/sdata.2015.1

Introduction

The fMRI dataset used for this example is part of a multi-subject, multi-modal (sMRI, fMRI, MEG, EEG) neuroimaging dataset on face processing. It contains data in BIDS format on sixteen healthy volunteers. The data was recoreded while the volunteers performed multiple runs of hundreds of trials of a simple perceptual task on pictures of familiar, unfamiliar and scrambled faces during two visits to the laboratory.

The facial stimuli consisted of two groups of 300 greyscale photos, half of which were of famous people and half of which were of non-famous people (unknown to the participants). Each scrambled face was created either from the famous face or the non-famous face of the same stimulus number. Additionally, each image was presented twice to the participants. The second presentation occurred either immediately after the first presentation (Immediate Repeats) or after 5–15 intervening stimuli (Delayed Repeats), with 50% of each type of repeat. To ensure that each stimulus received equal attention, participants were instructed to use their left or right index finger to press one of two keys (assignment counter-balanced across participants). They determined the symmetry of each image by pressing a key based on whether they perceived it to be ‘more’ or ‘less symmetric’ than average.

In the original paper (Wakeman & Henson, 2015), the repetition manipulation was not distinguished, meaning that initial and repeated presentations were treated identically without considering the timing of the repeats.

To illustrate the setup of a 3x2 factorial design analysis (familiar vs. unfamiliar vs. scrambled faces) x (1st vs. 2nd presentation) in an SPM Nipype workflow, the event files will be adapted accordingly. Each stimulus type will be labeled as either the first or second presentation. However, for simplicity, no distinction is made between immediate and delayed repetitions, resulting in 6 stimulus types (conditions): Familiar-Rep1 (F1), Familiar-Rep2 (F2), Unfamiliar-Rep1 (U1), Unfamiliar-Rep2 (U2), Scrambled-Rep1 (S1), and Scrambled-Rep2 (S2).

Examples of a familiar, unfamiliar and scrambled face:

[INFO] Attempting a clone into /home/jovyan/workspace/books/examples/functional_imaging/ds000117 
[INFO] Attempting to clone from https://github.com/OpenNeuroDatasets/ds000117.git to /home/jovyan/workspace/books/examples/functional_imaging/ds000117 
[INFO] Start enumerating objects 
[INFO] Start receiving objects 
[INFO] Start resolving deltas 
[INFO] Completed clone attempts for Dataset(/home/jovyan/workspace/books/examples/functional_imaging/ds000117) 
[INFO] Remote origin not usable by git-annex; setting annex-ignore 
[INFO] https://github.com/OpenNeuroDatasets/ds000117.git/config download failed: Not Found 
[INFO] access to 1 dataset sibling s3-BACKUP not auto-enabled, enable with:
| 		datalad siblings -d "/home/jovyan/workspace/books/examples/functional_imaging/ds000117" enable -s s3-BACKUP 
Note: switching to '1.0.5'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 12470d393 [OpenNeuro] Recorded changes
install(ok): /home/jovyan/workspace/books/examples/functional_imaging/ds000117 (dataset)
get(ok): stimuli/func/s001.bmp (file) [from s3-PUBLIC...]
get(ok): stimuli/func/u001.bmp (file) [from s3-PUBLIC...]
get(ok): stimuli/func/pf001.bmp (file) [from s3-PUBLIC...]
get(ok): stimuli/func/pu001.bmp (file) [from s3-PUBLIC...]
get(ok): stimuli/func/ps001.bmp (file) [from s3-PUBLIC...]
get(ok): stimuli/func/f001.bmp (file) [from s3-PUBLIC...]
action summary:
  get (ok: 6)
<Figure size 1200x400 with 3 Axes>

Download Data and install Python modules

HEAD is now at 12470d393 [OpenNeuro] Recorded changes
action summary:
  get (notneeded: 46)
[INFO] Attempting a clone into /home/jovyan/workspace/books/examples/functional_imaging/ds000117-fmriprep 
[INFO] Attempting to clone from https://github.com/OpenNeuroDerivatives/ds000117-fmriprep.git to /home/jovyan/workspace/books/examples/functional_imaging/ds000117-fmriprep 
[INFO] Start enumerating objects 
[INFO] Start counting objects 
[INFO] Start compressing objects 
[INFO] Start receiving objects 
[INFO] Start resolving deltas 
[INFO] Completed clone attempts for Dataset(/home/jovyan/workspace/books/examples/functional_imaging/ds000117-fmriprep) 
[INFO] Remote origin not usable by git-annex; setting annex-ignore 
[INFO] https://github.com/OpenNeuroDerivatives/ds000117-fmriprep.git/config download failed: Not Found 
install(ok): /home/jovyan/workspace/books/examples/functional_imaging/ds000117-fmriprep (dataset)
get(ok): sub-01/ses-mri/func/sub-01_ses-mri_task-facerecognition_run-2_space-MNI152NLin6Asym_desc-smoothAROMAnonaggr_bold.nii.gz (file) [from openneuro-derivatives...]
get(ok): sub-04/ses-mri/func/sub-04_ses-mri_task-facerecognition_run-2_space-MNI152NLin6Asym_desc-smoothAROMAnonaggr_bold.nii.gz (file) [from openneuro-derivatives...]
get(ok): sub-03/ses-mri/func/sub-03_ses-mri_task-facerecognition_run-1_space-MNI152NLin6Asym_desc-smoothAROMAnonaggr_bold.nii.gz (file) [from openneuro-derivatives...]
get(ok): sub-02/ses-mri/func/sub-02_ses-mri_task-facerecognition_run-1_space-MNI152NLin6Asym_desc-smoothAROMAnonaggr_bold.nii.gz (file) [from openneuro-derivatives...]
get(ok): sub-05/ses-mri/func/sub-05_ses-mri_task-facerecognition_run-2_space-MNI152NLin6Asym_desc-smoothAROMAnonaggr_bold.nii.gz (file) [from openneuro-derivatives...]
get(ok): sub-05/ses-mri/func/sub-05_ses-mri_task-facerecognition_run-1_space-MNI152NLin6Asym_desc-smoothAROMAnonaggr_bold.nii.gz (file) [from openneuro-derivatives...]
get(ok): sub-01/ses-mri/func/sub-01_ses-mri_task-facerecognition_run-1_space-MNI152NLin6Asym_desc-smoothAROMAnonaggr_bold.nii.gz (file) [from openneuro-derivatives...]
get(ok): sub-04/ses-mri/func/sub-04_ses-mri_task-facerecognition_run-1_space-MNI152NLin6Asym_desc-smoothAROMAnonaggr_bold.nii.gz (file) [from openneuro-derivatives...]
get(ok): sub-03/ses-mri/func/sub-03_ses-mri_task-facerecognition_run-2_space-MNI152NLin6Asym_desc-smoothAROMAnonaggr_bold.nii.gz (file) [from openneuro-derivatives...]
get(ok): sub-02/ses-mri/func/sub-02_ses-mri_task-facerecognition_run-2_space-MNI152NLin6Asym_desc-smoothAROMAnonaggr_bold.nii.gz (file) [from openneuro-derivatives...]
action summary:
  get (ok: 10)

Load SPM and import Python and Nipype modules

['spm12/r7771']
1.12.0

Analysis

1. First Level Analysis

Prepare Data Input

Repetition Time: 2.0

Start the workflow

Input stream

SPM12 can accept NIfTI files as input, but only if they are not compressed (‘unzipped’). Use Gunzip node to unzip the files, before feeding them it to the model specification node.

First-level GLM

The subsequent task involves obtaining information such as stimuli type, onset, duration, and other regressors for integration into the GLM model. To accomplish this, a helper function needs to be created, which will be referred to as subjectinfo.

A TSV file for each run looks like this:

onset	duration	circle_duration	stim_type	trigger	button_pushed	response_time	stim_file
0	.908	.534	FAMOUS	5	4	2.158	func/f013.bmp
3.273	.962	.586	FAMOUS	6	4	1.233	func/f013.bmp
6.647	.825	.546	UNFAMILIAR	13	4	1.183	func/u014.bmp
9.838	.968	.597	UNFAMILIAR	14	4	.930	func/u014.bmp
12.978	.904	.415	UNFAMILIAR	13	7	1.068	func/u016.bmp
16.219	.859	.558	UNFAMILIAR	14	7	1.207	func/u016.bmp
19.443	.804	.585	UNFAMILIAR	13	4	1.286	func/u010.bmp
22.55	.879	.526	UNFAMILIAR	14	4	1.008	func/u010.bmp
25.606	.866	.416	SCRAMBLED	17	7	1.929	func/s002.bmp
28.697	.884	.461	SCRAMBLED	18	4	1.300	func/s002.bmp
31.319	20.000	20.000	n/a	999	20000	20.000	func/i999.bmp
51.898	.974	.543	FAMOUS	5	7	2.477	func/f004.bmp
55.173	.925	.534	SCRAMBLED	17	7	1.372	func/s008.bmp
58.313	.985	.439	UNFAMILIAR	13	4	1.431	func/u012.bmp
61.587	.862	.533	FAMOUS	5	4	1.086	func/f012.bmp
64.677	.869	.461	FAMOUS	6	4	1.018	func/f012.bmp
67.75	.804	.446	SCRAMBLED	17	7	1.267	func/s007.bmp
70.774	.873	.445	SCRAMBLED	17	7	1.211	func/s011.bmp
73.881	.983	.466	FAMOUS	7	7	1.203	func/f004.bmp
77.105	.998	.468	SCRAMBLED	17	7	1.240	func/s015.bmp
80.445	.833	.583	SCRAMBLED	19	7	1.379	func/s008.bmp
83.469	.940	.434	FAMOUS	5	7	1.637	func/f006.bmp
86.676	.813	.488	FAMOUS	6	7	1.209	func/f006.bmp
89.833	.994	.570	UNFAMILIAR	15	4	1.444	func/u012.bmp
93.19	.997	.594	FAMOUS	5	7	1.352	func/f009.bmp
96.448	.869	.491	FAMOUS	5	7	1.012	func/f005.bmp
99.655	.821	.571	SCRAMBLED	19	7	1.483	func/s007.bmp
102.695	.933	.437	FAMOUS	5	7	1.228	func/f002.bmp
105.869	.818	.481	FAMOUS	6	7	1.109	func/f002.bmp
108.942	.925	.487	SCRAMBLED	19	7	1.205	func/s011.bmp
111.615	20.000	20.000	n/a	999	20000	20.000	func/i999.bmp
132.144	.980	.498	FAMOUS	5	7	.898	func/f014.bmp
135.351	.833	.458	SCRAMBLED	19	n/a	0	func/s015.bmp
138.541	.999	.591	SCRAMBLED	17	4	1.940	func/s004.bmp
141.849	.868	.548	FAMOUS	5	4	1.366	func/f001.bmp
144.906	.832	.421	FAMOUS	6	4	1.433	func/f001.bmp
147.946	.897	.445	FAMOUS	7	7	.767	func/f009.bmp
151.186	.971	.575	UNFAMILIAR	13	7	1.604	func/u013.bmp
154.393	.978	.458	FAMOUS	7	7	1.137	func/f005.bmp
157.701	.984	.564	FAMOUS	5	7	1.248	func/f015.bmp
161.008	.900	.556	UNFAMILIAR	13	4	1.239	func/u011.bmp
164.265	.828	.594	UNFAMILIAR	14	4	1.269	func/u011.bmp
167.306	.830	.447	FAMOUS	7	7	1.116	func/f014.bmp
170.312	.992	.415	FAMOUS	5	7	1.806	func/f003.bmp
173.519	.942	.442	FAMOUS	6	7	1.361	func/f003.bmp
176.777	.874	.539	SCRAMBLED	19	4	1.363	func/s004.bmp
179.984	.845	.559	SCRAMBLED	17	4	1.131	func/s012.bmp
183.058	.981	.467	SCRAMBLED	17	7	.872	func/s001.bmp
186.365	.880	.559	SCRAMBLED	18	7	1.000	func/s001.bmp
189.422	.858	.414	UNFAMILIAR	15	4	1.095	func/u013.bmp
192.027	20.000	20.000	n/a	999	20000	20.000	func/i999.bmp
212.623	.873	.554	SCRAMBLED	17	4	1.718	func/s006.bmp
215.83	.863	.558	FAMOUS	7	7	1.115	func/f015.bmp
218.937	.984	.479	SCRAMBLED	17	7	1.449	func/s014.bmp
222.178	.873	.487	SCRAMBLED	18	7	.834	func/s014.bmp
225.452	.912	.536	UNFAMILIAR	13	4	1.099	func/u002.bmp
228.559	.952	.419	UNFAMILIAR	14	4	.915	func/u002.bmp
231.733	.891	.465	UNFAMILIAR	13	4	1.023	func/u004.bmp
234.89	.947	.496	UNFAMILIAR	14	4	.953	func/u004.bmp
238.164	.824	.560	SCRAMBLED	19	7	1.068	func/s012.bmp
241.187	.922	.425	FAMOUS	5	4	1.154	func/f011.bmp
244.478	.941	.593	SCRAMBLED	17	7	1.283	func/s005.bmp
247.668	.857	.482	SCRAMBLED	18	7	1.023	func/s005.bmp
250.825	.813	.524	SCRAMBLED	19	7	1.329	func/s006.bmp
253.849	.921	.450	FAMOUS	5	7	1.221	func/f007.bmp
257.072	.903	.528	SCRAMBLED	17	7	.788	func/s016.bmp
260.163	.969	.419	FAMOUS	5	4	1.369	func/f010.bmp
263.403	.892	.516	FAMOUS	6	4	1.183	func/f010.bmp
266.627	.950	.562	SCRAMBLED	17	7	1.326	func/s009.bmp
269.901	.935	.561	SCRAMBLED	18	7	1.010	func/s009.bmp
273.025	.896	.434	FAMOUS	7	7	1.431	func/f011.bmp
275.664	20.000	20.000	n/a	999	20000	20.000	func/i999.bmp
296.109	.895	.410	SCRAMBLED	17	4	1.541	func/s010.bmp
299.233	.908	.452	SCRAMBLED	18	4	1.010	func/s010.bmp
302.373	.866	.457	UNFAMILIAR	13	4	1.137	func/u008.bmp
305.53	.880	.519	FAMOUS	7	7	1.127	func/f007.bmp
308.588	.821	.417	SCRAMBLED	17	7	1.208	func/s003.bmp
311.594	.873	.403	SCRAMBLED	18	7	.965	func/s003.bmp
314.784	.967	.543	SCRAMBLED	19	7	1.126	func/s016.bmp
318.008	.913	.495	SCRAMBLED	17	4	1.137	func/s013.bmp
321.165	.957	.477	UNFAMILIAR	13	4	1.073	func/u007.bmp
324.423	.826	.534	UNFAMILIAR	14	4	.934	func/u007.bmp
327.479	.998	.457	UNFAMILIAR	13	4	1.293	func/u015.bmp
330.77	.981	.534	UNFAMILIAR	13	4	1.075	func/u009.bmp
334.011	.920	.491	UNFAMILIAR	15	4	1.075	func/u008.bmp
337.134	.967	.442	FAMOUS	5	7	.754	func/f008.bmp
340.425	.946	.552	FAMOUS	6	7	.917	func/f008.bmp
343.632	.870	.489	UNFAMILIAR	13	4	1.286	func/u003.bmp
346.839	.990	.552	UNFAMILIAR	14	4	1.141	func/u003.bmp
350.146	.937	.542	SCRAMBLED	19	4	1.334	func/s013.bmp
352.836	20.000	20.000	n/a	999	20000	20.000	func/i999.bmp
373.298	.816	.420	UNFAMILIAR	13	4	1.415	func/u001.bmp
376.455	.837	.577	UNFAMILIAR	14	4	1.247	func/u001.bmp
379.646	.825	.572	UNFAMILIAR	13	7	1.292	func/u006.bmp
382.786	.995	.540	UNFAMILIAR	15	4	1.003	func/u015.bmp
385.993	.976	.447	UNFAMILIAR	13	7	1.536	func/u005.bmp
389.3	.906	.558	UNFAMILIAR	15	4	1.078	func/u009.bmp
392.508	.957	.526	FAMOUS	5	7	1.223	func/f016.bmp
395.264	.012	0	n/a	999	0	0	func/Circle.bmp

As mentioned in the introduction, these event files will be adapted in the function ‘subjectinfo’ to demonstrate the setup of a 3x2 factorial design analysis. The original stimulus types (stim_types) FAMOUS, NONFAMILIAR, SCRAMBLED will be replaced with F1 (first presentation of an image of a famous face)/ F2 (second presentation of image), U1/U2 and S1/S1 due to the first or second occurance of the respective stimulus file (stim_file). In addition, stimuli of stimulus type n/a are deleted.

Level1Design: canonical HRF

The design matrix will be constructed without including derivatives of the hemodynamic response function (HRF) and therefore assumes a constant delay and dispersion for the hemodynamic response.

Starting in nipype version 1.8.7., when factor_info parameter is used in Level1design, T and F contrasts (ess, con, spmF and spmT images) are created automatically in EstimateModel by SPM. They need to be connected directly to a data output module

The following lines automatically inform SPM to create a default set of contrats for a factorial design.

stty: 'standard input': Inappropriate ioctl for device
Specify GLM contrast for nipype<=1.8.6

Contrasts need to be set up manually as they are not created automatically in EstimateModel when factor_info parameter is used in Level1Design.

Output stream

261008-16:34:28,585 nipype.workflow INFO:
	 Generated workflow graph: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level1_spm/graph.png (graph2use=colored, simple_form=True).
<IPython.core.display.Image object>
Fetching long content....
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
<networkx.classes.digraph.DiGraph at 0x78ac6f0eb750>

Visualize design matrix and list contrasts

<Figure size 1000x800 with 1 Axes>

2. Second Level Analysis

For a factorial design with 2 factors there are 4 effects to test for: an overall effect, 2 main effects and one two-way interaction:

  • To test (1) the overall effect, use a [1 1 1 1 1 1] contrast for each subject and take the resulting con images of all subjects into a one-sample t-test at the second level. Then specify a [1] F-contrast (at the second level) to test for significantly non-zero BOLD responses related to the paradigm.

  • To test for (2) the main effect of Factor Repetition (two levels), use a [1 -1 1 -1 1 -1] contrast for each subject and take the resulting con images into a one-sample t-test at the second level.

  • To test for (3) the main effect of Factor Face (three levels), use two contrasts per subject [1 1 -1 -1 0 0] and [0 0 1 1 -1 -1] and take all resulting con images (two per subject) into a two-sample t-test design at the second level. Then, use a [1 0; 0 1] F-contrast to test for this main effect.

  • To test for (4) the interaction between Factors Face and Rep, use two contrasts per subject [1 -1 -1 1 0 0] and [0 0 1 -1 -1 1] and take all resulting con images (two per subject) into a two-sample t-test design at the second level. Use then a [1 0; 0 1] F-contrast to test for this interaction effect.

2.1 One Sample T-Test: Overall effect, main effect of repetition

Test for significantly non-zero BOLD responses over all subjects.

  • con_0005: Positive effect

  • con_0006: Positive Effect F>S

  • con_0007: Positive Effect S>U

  • con_0008: Positive Effect of rep1>rep2

  • con_0009: Positive Interaction Face (F/S) x Rep

  • con_0010: Positive Interaction Face (S/U) x Rep

261008-16:36:04,694 nipype.workflow INFO:
	 Generated workflow graph: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_1sample/graph.png (graph2use=colored, simple_form=True).
<IPython.core.display.Image object>
Fetching long content....
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
<networkx.classes.digraph.DiGraph at 0x78aca6b262c0>

2.1 Two Sample T-Test: Main effect of face, Interaction Face x Repetition

Main effect of face: enter the following 2 contrasts per subject into a two-sample t-test and use 1 0, 0 1 F contrast

  • con_0006: Positive Effect F>S

  • con_0007: Positive Effect S>U

Interaction Face x Rep: enter the following 2 contrasts per subject into a two-sample t-test and use 1 0, 0 1 F contrast

  • con_0009: Positive Interaction Face (F/S) x Rep

  • con_0010: Positive Interaction Face (S/U) x Rep

261008-16:37:07,83 nipype.workflow INFO:
	 Generated workflow graph: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/graph.png (graph2use=colored, simple_form=True).
<IPython.core.display.Image object>
261008-16:37:07,94 nipype.workflow INFO:
	 Workflow level2_spm_2sample settings: ['check', 'execution', 'logging', 'monitoring']
261008-16:37:07,99 nipype.workflow INFO:
	 Running in parallel.
261008-16:37:07,100 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 56.51/56.51, Free processors: 16/16, Free GPU slot:0/0.
261008-16:37:07,359 nipype.workflow INFO:
	 [Node] Setting-up "level2_spm_2sample.l2source" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/l2source".
261008-16:37:07,365 nipype.workflow INFO:
	 [Node] Executing "l2source" <nipype.interfaces.io.DataGrabber>
261008-16:37:07,368 nipype.workflow INFO:
	 [Node] Finished "l2source", elapsed time 0.001456s.
261008-16:37:09,101 nipype.workflow INFO:
	 [Job 0] Completed (level2_spm_2sample.l2source).
261008-16:37:09,104 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 56.51/56.51, Free processors: 16/16, Free GPU slot:0/0.
261008-16:37:09,266 nipype.workflow INFO:
	 [Node] Setting-up "level2_spm_2sample.twosampttestdes" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/twosampttestdes".
261008-16:37:09,274 nipype.workflow INFO:
	 [Node] Executing "twosampttestdes" <nipype.interfaces.spm.model.TwoSampleTTestDesign>
261008-16:37:11,102 nipype.workflow INFO:
	 [MultiProc] Running 1 tasks, and 0 jobs ready. Free memory (GB): 56.31/56.51, Free processors: 15/16, Free GPU slot:0/0.
                     Currently running:
                       * level2_spm_2sample.twosampttestdes
261008-16:37:22,617 nipype.workflow INFO:
	 [Node] Finished "twosampttestdes", elapsed time 13.340589s.
261008-16:37:23,103 nipype.workflow INFO:
	 [Job 1] Completed (level2_spm_2sample.twosampttestdes).
261008-16:37:23,105 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 56.51/56.51, Free processors: 16/16, Free GPU slot:0/0.
261008-16:37:23,308 nipype.workflow INFO:
	 [Node] Setting-up "level2_spm_2sample.level2estimate" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/level2estimate".
261008-16:37:23,316 nipype.workflow INFO:
	 [Node] Executing "level2estimate" <nipype.interfaces.spm.model.EstimateModel>
261008-16:37:25,104 nipype.workflow INFO:
	 [MultiProc] Running 1 tasks, and 0 jobs ready. Free memory (GB): 56.31/56.51, Free processors: 15/16, Free GPU slot:0/0.
                     Currently running:
                       * level2_spm_2sample.level2estimate
261008-16:37:37,966 nipype.workflow INFO:
	 [Node] Finished "level2estimate", elapsed time 14.648856s.
261008-16:37:39,105 nipype.workflow INFO:
	 [Job 2] Completed (level2_spm_2sample.level2estimate).
261008-16:37:39,106 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 56.51/56.51, Free processors: 16/16, Free GPU slot:0/0.
261008-16:37:39,216 nipype.workflow INFO:
	 [Node] Setting-up "level2_spm_2sample.level2conestimate" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/level2conestimate".
261008-16:37:39,225 nipype.workflow INFO:
	 [Node] Executing "level2conestimate" <nipype.interfaces.spm.model.EstimateContrast>
261008-16:37:41,105 nipype.workflow INFO:
	 [MultiProc] Running 1 tasks, and 0 jobs ready. Free memory (GB): 56.31/56.51, Free processors: 15/16, Free GPU slot:0/0.
                     Currently running:
                       * level2_spm_2sample.level2conestimate
261008-16:37:52,647 nipype.workflow INFO:
	 [Node] Finished "level2conestimate", elapsed time 13.420004s.
261008-16:37:53,106 nipype.workflow INFO:
	 [Job 3] Completed (level2_spm_2sample.level2conestimate).
261008-16:37:53,108 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 56.51/56.51, Free processors: 16/16, Free GPU slot:0/0.
261008-16:37:55,107 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 3 jobs ready. Free memory (GB): 56.51/56.51, Free processors: 16/16, Free GPU slot:0/0.
261008-16:37:55,214 nipype.workflow INFO:
	 [Node] Setting-up "_level2thresh0" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/level2thresh/mapflow/_level2thresh0".
261008-16:37:55,215 nipype.workflow INFO:
	 [Node] Setting-up "_level2thresh1" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/level2thresh/mapflow/_level2thresh1".
261008-16:37:55,216 nipype.workflow INFO:
	 [Node] Setting-up "_level2thresh2" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/level2thresh/mapflow/_level2thresh2".
261008-16:37:55,222 nipype.workflow INFO:
	 [Node] Executing "_level2thresh0" <nipype.interfaces.spm.model.Threshold>
261008-16:37:55,222 nipype.workflow INFO:
	 [Node] Executing "_level2thresh1" <nipype.interfaces.spm.model.Threshold>
261008-16:37:55,223 nipype.workflow INFO:
	 [Node] Executing "_level2thresh2" <nipype.interfaces.spm.model.Threshold>
261008-16:37:57,107 nipype.workflow INFO:
	 [MultiProc] Running 3 tasks, and 0 jobs ready. Free memory (GB): 55.91/56.51, Free processors: 13/16, Free GPU slot:0/0.
                     Currently running:
                       * _level2thresh2
                       * _level2thresh1
                       * _level2thresh0
261008-16:38:04,82 nipype.workflow INFO:
	 [Node] Finished "_level2thresh0", elapsed time 8.858623s.
261008-16:38:04,163 nipype.workflow INFO:
	 [Node] Finished "_level2thresh1", elapsed time 8.939162s.
261008-16:38:04,252 nipype.workflow INFO:
	 [Node] Finished "_level2thresh2", elapsed time 9.026772s.
261008-16:38:05,107 nipype.workflow INFO:
	 [Job 6] Completed (_level2thresh0).
261008-16:38:05,108 nipype.workflow INFO:
	 [Job 7] Completed (_level2thresh1).
261008-16:38:05,109 nipype.workflow INFO:
	 [Job 8] Completed (_level2thresh2).
261008-16:38:05,110 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 56.51/56.51, Free processors: 16/16, Free GPU slot:0/0.
261008-16:38:05,221 nipype.workflow INFO:
	 [Node] Setting-up "_level2thresh0" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/level2thresh/mapflow/_level2thresh0".
261008-16:38:05,225 nipype.workflow INFO:
	 [Node] Cached "_level2thresh0" - collecting precomputed outputs
261008-16:38:05,226 nipype.workflow INFO:
	 [Node] "_level2thresh0" found cached.
261008-16:38:05,228 nipype.workflow INFO:
	 [Node] Setting-up "_level2thresh1" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/level2thresh/mapflow/_level2thresh1".
261008-16:38:05,229 nipype.workflow INFO:
	 [Node] Cached "_level2thresh1" - collecting precomputed outputs
261008-16:38:05,230 nipype.workflow INFO:
	 [Node] "_level2thresh1" found cached.
261008-16:38:05,232 nipype.workflow INFO:
	 [Node] Setting-up "_level2thresh2" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/level2thresh/mapflow/_level2thresh2".
261008-16:38:05,233 nipype.workflow INFO:
	 [Node] Cached "_level2thresh2" - collecting precomputed outputs
261008-16:38:05,234 nipype.workflow INFO:
	 [Node] "_level2thresh2" found cached.
261008-16:38:07,108 nipype.workflow INFO:
	 [Job 4] Completed (level2_spm_2sample.level2thresh).
261008-16:38:07,109 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 56.51/56.51, Free processors: 16/16, Free GPU slot:0/0.
261008-16:38:07,218 nipype.workflow INFO:
	 [Node] Setting-up "level2_spm_2sample.datasink_2nd_2" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/datasink_2nd_2".
261008-16:38:07,226 nipype.workflow INFO:
	 [Node] Executing "datasink_2nd_2" <nipype.interfaces.io.DataSink>
261008-16:38:07,228 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/SPM.mat -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/MainEffectFace/SPM.mat
261008-16:38:07,229 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/spmT_0001.nii -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/MainEffectFace/spmT_0001.nii
261008-16:38:07,230 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/spmT_0002.nii -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/MainEffectFace/spmT_0002.nii
261008-16:38:07,231 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/spmF_0003.nii -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/MainEffectFace/spmF_0003.nii
261008-16:38:07,232 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/con_0001.nii -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/MainEffectFace/con_0001.nii
261008-16:38:07,233 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/con_0002.nii -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/MainEffectFace/con_0002.nii
261008-16:38:07,234 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/ess_0003.nii -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/MainEffectFace/ess_0003.nii
261008-16:38:07,235 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/_level2thresh0/spmT_0001_thr.nii -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/MainEffectFace/thresh_con1/spmT_0001_thr.nii
261008-16:38:07,235 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/_level2thresh1/spmT_0002_thr.nii -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/MainEffectFace/thresh_con2/spmT_0002_thr.nii
261008-16:38:07,236 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/_level2thresh2/spmF_0003_thr.nii -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/MainEffectFace/thresh_con3/spmF_0003_thr.nii
261008-16:38:07,238 nipype.workflow INFO:
	 [Node] Finished "datasink_2nd_2", elapsed time 0.009315s.
261008-16:38:09,108 nipype.workflow INFO:
	 [Job 5] Completed (level2_spm_2sample.datasink_2nd_2).
261008-16:38:09,109 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 0 jobs ready. Free memory (GB): 56.51/56.51, Free processors: 16/16, Free GPU slot:0/0.
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
<networkx.classes.digraph.DiGraph at 0x78aca6b27820>
261008-16:38:11,151 nipype.workflow INFO:
	 Workflow level2_spm_2sample settings: ['check', 'execution', 'logging', 'monitoring']
261008-16:38:11,158 nipype.workflow INFO:
	 Running in parallel.
261008-16:38:11,159 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 56.51/56.51, Free processors: 16/16, Free GPU slot:0/0.
261008-16:38:11,267 nipype.workflow INFO:
	 [Node] Outdated cache found for "level2_spm_2sample.l2source".
261008-16:38:11,268 nipype.workflow INFO:
	 [Node] Outdated cache found for "level2_spm_2sample.l2source".
261008-16:38:11,406 nipype.workflow INFO:
	 [Node] Setting-up "level2_spm_2sample.l2source" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/l2source".
261008-16:38:11,409 nipype.workflow INFO:
	 [Node] Outdated cache found for "level2_spm_2sample.l2source".
261008-16:38:11,412 nipype.workflow INFO:
	 [Node] Executing "l2source" <nipype.interfaces.io.DataGrabber>
261008-16:38:11,415 nipype.workflow INFO:
	 [Node] Finished "l2source", elapsed time 0.001146s.
261008-16:38:13,160 nipype.workflow INFO:
	 [Job 0] Completed (level2_spm_2sample.l2source).
261008-16:38:13,163 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 56.51/56.51, Free processors: 16/16, Free GPU slot:0/0.
261008-16:38:13,324 nipype.workflow INFO:
	 [Node] Outdated cache found for "level2_spm_2sample.twosampttestdes".
261008-16:38:13,325 nipype.workflow INFO:
	 [Node] Outdated cache found for "level2_spm_2sample.twosampttestdes".
261008-16:38:13,329 nipype.workflow INFO:
	 [Node] Setting-up "level2_spm_2sample.twosampttestdes" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/twosampttestdes".
261008-16:38:13,332 nipype.workflow INFO:
	 [Node] Outdated cache found for "level2_spm_2sample.twosampttestdes".
261008-16:38:13,336 nipype.workflow INFO:
	 [Node] Executing "twosampttestdes" <nipype.interfaces.spm.model.TwoSampleTTestDesign>
261008-16:38:15,160 nipype.workflow INFO:
	 [MultiProc] Running 1 tasks, and 0 jobs ready. Free memory (GB): 56.31/56.51, Free processors: 15/16, Free GPU slot:0/0.
                     Currently running:
                       * level2_spm_2sample.twosampttestdes
261008-16:38:26,362 nipype.workflow INFO:
	 [Node] Finished "twosampttestdes", elapsed time 13.023913s.
261008-16:38:27,161 nipype.workflow INFO:
	 [Job 1] Completed (level2_spm_2sample.twosampttestdes).
261008-16:38:27,162 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 56.51/56.51, Free processors: 16/16, Free GPU slot:0/0.
261008-16:38:27,275 nipype.workflow INFO:
	 [Node] Outdated cache found for "level2_spm_2sample.level2estimate".
261008-16:38:27,276 nipype.workflow INFO:
	 [Node] Outdated cache found for "level2_spm_2sample.level2estimate".
261008-16:38:27,279 nipype.workflow INFO:
	 [Node] Setting-up "level2_spm_2sample.level2estimate" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/level2estimate".
261008-16:38:27,282 nipype.workflow INFO:
	 [Node] Outdated cache found for "level2_spm_2sample.level2estimate".
261008-16:38:27,290 nipype.workflow INFO:
	 [Node] Executing "level2estimate" <nipype.interfaces.spm.model.EstimateModel>
261008-16:38:29,161 nipype.workflow INFO:
	 [MultiProc] Running 1 tasks, and 0 jobs ready. Free memory (GB): 56.31/56.51, Free processors: 15/16, Free GPU slot:0/0.
                     Currently running:
                       * level2_spm_2sample.level2estimate
261008-16:38:42,103 nipype.workflow INFO:
	 [Node] Finished "level2estimate", elapsed time 14.811416s.
261008-16:38:43,162 nipype.workflow INFO:
	 [Job 2] Completed (level2_spm_2sample.level2estimate).
261008-16:38:43,164 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 56.51/56.51, Free processors: 16/16, Free GPU slot:0/0.
261008-16:38:43,273 nipype.workflow INFO:
	 [Node] Outdated cache found for "level2_spm_2sample.level2conestimate".
261008-16:38:43,274 nipype.workflow INFO:
	 [Node] Outdated cache found for "level2_spm_2sample.level2conestimate".
261008-16:38:43,278 nipype.workflow INFO:
	 [Node] Setting-up "level2_spm_2sample.level2conestimate" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/level2conestimate".
261008-16:38:43,281 nipype.workflow INFO:
	 [Node] Outdated cache found for "level2_spm_2sample.level2conestimate".
261008-16:38:43,288 nipype.workflow INFO:
	 [Node] Executing "level2conestimate" <nipype.interfaces.spm.model.EstimateContrast>
261008-16:38:45,163 nipype.workflow INFO:
	 [MultiProc] Running 1 tasks, and 0 jobs ready. Free memory (GB): 56.31/56.51, Free processors: 15/16, Free GPU slot:0/0.
                     Currently running:
                       * level2_spm_2sample.level2conestimate
261008-16:38:56,693 nipype.workflow INFO:
	 [Node] Finished "level2conestimate", elapsed time 13.403742s.
261008-16:38:57,164 nipype.workflow INFO:
	 [Job 3] Completed (level2_spm_2sample.level2conestimate).
261008-16:38:57,165 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 56.51/56.51, Free processors: 16/16, Free GPU slot:0/0.
261008-16:38:59,164 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 3 jobs ready. Free memory (GB): 56.51/56.51, Free processors: 16/16, Free GPU slot:0/0.
261008-16:38:59,273 nipype.workflow INFO:
	 [Node] Outdated cache found for "_level2thresh0".
261008-16:38:59,274 nipype.workflow INFO:
	 [Node] Outdated cache found for "_level2thresh0".
261008-16:38:59,276 nipype.workflow INFO:
	 [Node] Outdated cache found for "_level2thresh1".
261008-16:38:59,277 nipype.workflow INFO:
	 [Node] Outdated cache found for "_level2thresh1".
261008-16:38:59,278 nipype.workflow INFO:
	 [Node] Outdated cache found for "_level2thresh2".
261008-16:38:59,279 nipype.workflow INFO:
	 [Node] Outdated cache found for "_level2thresh2".
261008-16:38:59,277 nipype.workflow INFO:
	 [Node] Setting-up "_level2thresh0" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/level2thresh/mapflow/_level2thresh0".
261008-16:38:59,280 nipype.workflow INFO:
	 [Node] Outdated cache found for "_level2thresh0".
261008-16:38:59,283 nipype.workflow INFO:
	 [Node] Setting-up "_level2thresh1" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/level2thresh/mapflow/_level2thresh1".
261008-16:38:59,283 nipype.workflow INFO:
	 [Node] Setting-up "_level2thresh2" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/level2thresh/mapflow/_level2thresh2".
261008-16:38:59,286 nipype.workflow INFO:
	 [Node] Outdated cache found for "_level2thresh1".
261008-16:38:59,286 nipype.workflow INFO:
	 [Node] Executing "_level2thresh0" <nipype.interfaces.spm.model.Threshold>
261008-16:38:59,287 nipype.workflow INFO:
	 [Node] Outdated cache found for "_level2thresh2".
261008-16:38:59,291 nipype.workflow INFO:
	 [Node] Executing "_level2thresh1" <nipype.interfaces.spm.model.Threshold>
261008-16:38:59,292 nipype.workflow INFO:
	 [Node] Executing "_level2thresh2" <nipype.interfaces.spm.model.Threshold>
261008-16:39:01,165 nipype.workflow INFO:
	 [MultiProc] Running 3 tasks, and 0 jobs ready. Free memory (GB): 55.91/56.51, Free processors: 13/16, Free GPU slot:0/0.
                     Currently running:
                       * _level2thresh2
                       * _level2thresh1
                       * _level2thresh0
261008-16:39:08,252 nipype.workflow INFO:
	 [Node] Finished "_level2thresh1", elapsed time 8.957812s.
261008-16:39:08,413 nipype.workflow INFO:
	 [Node] Finished "_level2thresh2", elapsed time 9.118723s.
261008-16:39:08,576 nipype.workflow INFO:
	 [Node] Finished "_level2thresh0", elapsed time 9.287068s.
261008-16:39:09,165 nipype.workflow INFO:
	 [Job 6] Completed (_level2thresh0).
261008-16:39:09,166 nipype.workflow INFO:
	 [Job 7] Completed (_level2thresh1).
261008-16:39:09,166 nipype.workflow INFO:
	 [Job 8] Completed (_level2thresh2).
261008-16:39:09,167 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 56.51/56.51, Free processors: 16/16, Free GPU slot:0/0.
261008-16:39:09,272 nipype.workflow INFO:
	 [Node] Outdated cache found for "level2_spm_2sample.level2thresh".
261008-16:39:09,273 nipype.workflow INFO:
	 [Node] Outdated cache found for "level2_spm_2sample.level2thresh".
261008-16:39:09,277 nipype.workflow INFO:
	 [Node] Outdated cache found for "level2_spm_2sample.level2thresh".
261008-16:39:09,284 nipype.workflow INFO:
	 [Node] Setting-up "_level2thresh0" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/level2thresh/mapflow/_level2thresh0".
261008-16:39:09,287 nipype.workflow INFO:
	 [Node] Cached "_level2thresh0" - collecting precomputed outputs
261008-16:39:09,287 nipype.workflow INFO:
	 [Node] "_level2thresh0" found cached.
261008-16:39:09,289 nipype.workflow INFO:
	 [Node] Setting-up "_level2thresh1" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/level2thresh/mapflow/_level2thresh1".
261008-16:39:09,291 nipype.workflow INFO:
	 [Node] Cached "_level2thresh1" - collecting precomputed outputs
261008-16:39:09,292 nipype.workflow INFO:
	 [Node] "_level2thresh1" found cached.
261008-16:39:09,294 nipype.workflow INFO:
	 [Node] Setting-up "_level2thresh2" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/level2thresh/mapflow/_level2thresh2".
261008-16:39:09,296 nipype.workflow INFO:
	 [Node] Cached "_level2thresh2" - collecting precomputed outputs
261008-16:39:09,296 nipype.workflow INFO:
	 [Node] "_level2thresh2" found cached.
261008-16:39:11,165 nipype.workflow INFO:
	 [Job 4] Completed (level2_spm_2sample.level2thresh).
261008-16:39:11,166 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 56.51/56.51, Free processors: 16/16, Free GPU slot:0/0.
261008-16:39:11,275 nipype.workflow INFO:
	 [Node] Outdated cache found for "level2_spm_2sample.datasink_2nd_2".
261008-16:39:11,276 nipype.workflow INFO:
	 [Node] Outdated cache found for "level2_spm_2sample.datasink_2nd_2".
261008-16:39:11,279 nipype.workflow INFO:
	 [Node] Setting-up "level2_spm_2sample.datasink_2nd_2" in "/home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_2sample/datasink_2nd_2".
261008-16:39:11,282 nipype.workflow INFO:
	 [Node] Outdated cache found for "level2_spm_2sample.datasink_2nd_2".
261008-16:39:11,286 nipype.workflow INFO:
	 [Node] Executing "datasink_2nd_2" <nipype.interfaces.io.DataSink>
261008-16:39:11,288 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/SPM.mat -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/InteractionFace_Repetition/SPM.mat
261008-16:39:11,289 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/spmT_0001.nii -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/InteractionFace_Repetition/spmT_0001.nii
261008-16:39:11,290 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/spmT_0002.nii -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/InteractionFace_Repetition/spmT_0002.nii
261008-16:39:11,291 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/spmF_0003.nii -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/InteractionFace_Repetition/spmF_0003.nii
261008-16:39:11,292 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/con_0001.nii -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/InteractionFace_Repetition/con_0001.nii
261008-16:39:11,293 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/con_0002.nii -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/InteractionFace_Repetition/con_0002.nii
261008-16:39:11,293 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/ess_0003.nii -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/InteractionFace_Repetition/ess_0003.nii
261008-16:39:11,294 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/_level2thresh0/spmT_0001_thr.nii -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/InteractionFace_Repetition/thresh_con1/spmT_0001_thr.nii
261008-16:39:11,295 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/_level2thresh1/spmT_0002_thr.nii -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/InteractionFace_Repetition/thresh_con2/spmT_0002_thr.nii
261008-16:39:11,296 nipype.interface INFO:
	 sub: /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/2ndLevel/_level2thresh2/spmF_0003_thr.nii -> /home/jovyan/workspace/books/examples/functional_imaging/spm_analysis/level2_spm_results_2sample/InteractionFace_Repetition/thresh_con3/spmF_0003_thr.nii
261008-16:39:11,298 nipype.workflow INFO:
	 [Node] Finished "datasink_2nd_2", elapsed time 0.009676s.
261008-16:39:13,165 nipype.workflow INFO:
	 [Job 5] Completed (level2_spm_2sample.datasink_2nd_2).
261008-16:39:13,167 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 0 jobs ready. Free memory (GB): 56.51/56.51, Free processors: 16/16, Free GPU slot:0/0.
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
<networkx.classes.digraph.DiGraph at 0x78aca66835c0>

Results

The group analysis was only done on N=9 subjects, a voxel-wise threshold of p<0.005 was chosen and a cluster-wise FDR threshold of p<0.05 to correct for multiple comparisons.

Look at the positive effect using the plot_stat_map plotting method of nilearn

<Figure size 1170x300 with 7 Axes>

Look at the results using the glass brain plotting method of

Note: with 5 subjects × 2 runs this is an underpowered demonstration — expect only the strongest contrast to survive thresholding; subtler contrasts may render as empty glass brains.

/tmp/ipykernel_2083/3476432501.py:4: UserWarning: empty mask
  plotting.plot_glass_brain(opj(experiment_dir, 'level2_spm_results_1sample/con6/spmT_0001_thr.nii'),
/tmp/ipykernel_2083/3476432501.py:13: UserWarning: empty mask
  plotting.plot_glass_brain(opj(experiment_dir, 'level2_spm_results_1sample/con9/spmT_0001_thr.nii'),
/tmp/ipykernel_2083/3476432501.py:16: UserWarning: empty mask
  plotting.plot_glass_brain(opj(experiment_dir, 'level2_spm_results_1sample/con10/spmT_0001_thr.nii'),
<Figure size 950x350 with 6 Axes>
<Figure size 950x350 with 6 Axes>
<Figure size 950x350 with 6 Axes>
<Figure size 950x350 with 6 Axes>
<Figure size 950x350 with 6 Axes>
<Figure size 950x350 with 6 Axes>

Visualize main effects face and interaction face x repetition

<Figure size 950x350 with 6 Axes>
<Figure size 950x350 with 6 Axes>

Dependencies in Jupyter/Python

  • Using the package watermark to document system environment and software versions used in this notebook, alongside the Neurodesktop version extracted from the JUPYTER_IMAGE or NEURODESKTOP_VERSION environment variables.

Last updated: 2026-10-08T16:39:21.895078+00:00

Python implementation: CPython
Python version       : 3.13.15
IPython version      : 9.17.1

Compiler    : GCC 15.3.0
OS          : Linux
Release     : 6.8.0-111-generic
Machine     : x86_64
Processor   : x86_64
CPU cores   : 16
Architecture: 64bit

IPython   : 9.17.1
json      : 2.0.9
matplotlib: 3.11.2
nilearn   : 0.13.1
nipype    : 1.12.0
numpy     : 2.5.3
packaging : 25.0
pandas    : 2.3.3
scipy     : 1.16.3

Neurodesktop version: 2026-10-05
References
  1. Esteban, O., Markiewicz, C. J., Burns, C., Goncalves, M., Jarecka, D., Ziegler, E., Berleant, S., Ellis, D. G., Pinsard, B., Madison, C., Waskom, M., Notter, M. P., Clark, D., Manhães-Savio, A., Clark, D., Jordan, K., Dayan, M., Halchenko, Y. O., Loney, F., … Ghosh, S. (2025). nipy/nipype: 1.8.6. Zenodo. 10.5281/ZENODO.15054147