Paired T Test Condition List

UPDATE - I dumped the SPM.mat using the command

SPM.xX.names to find the condition names Condition_{1} and Condition_{2} and it’s working now.

Thanks for your patience with a newbie.


Hi, I’m new to neurostars (and nipype). I’m trying to run a level 2 SPM post-processing analysis using a paired t test. My workflow runs cleanly up through the contrast_estimate and then I get the error:

Condition Condition1 not found in design

I’m not certain at this point how to specify the conditions list for the contrast(s). I’m including the complete runtime message log below.

Thanks very much for your help.

12.7507
0
190816-12:42:00,771 nipype.workflow INFO:
Workflow l2analysis settings: [‘check’, ‘execution’, ‘logging’, ‘monitoring’]
190816-12:42:00,943 nipype.workflow INFO:
Running serially.
190816-12:42:00,943 nipype.workflow INFO:
[Node] Setting-up “l2analysis.level2design” in “/input/auditory_oddball/results/l2analysis/level2design”.
190816-12:42:01,317 nipype.workflow INFO:
[Node] Running “level2design” (“nipype.interfaces.spm.model.PairedTTestDesign”)
190816-12:42:15,807 nipype.workflow INFO:
[Node] Finished “l2analysis.level2design”.
190816-12:42:15,809 nipype.workflow INFO:
[Node] Setting-up “l2analysis.level2estimate” in “/input/auditory_oddball/results/l2analysis/level2estimate”.
190816-12:42:15,842 nipype.workflow INFO:
[Node] Running “level2estimate” (“nipype.interfaces.spm.model.EstimateModel”)
190816-12:42:37,971 nipype.workflow INFO:
[Node] Finished “l2analysis.level2estimate”.
190816-12:42:37,971 nipype.workflow INFO:
[Node] Setting-up “l2analysis.contrast_estimate” in “/input/auditory_oddball/results/l2analysis/contrast_estimate”.
190816-12:42:38,400 nipype.workflow INFO:
[Node] Running “contrast_estimate” (“nipype.interfaces.spm.model.EstimateContrast”)
190816-12:42:45,701 nipype.workflow WARNING:
[Node] Error on “l2analysis.contrast_estimate” (/input/auditory_oddball/results/l2analysis/contrast_estimate)
190816-12:42:45,715 nipype.workflow ERROR:
Node contrast_estimate failed to run on host 19d98e8e1fc3.
190816-12:42:45,718 nipype.workflow ERROR:
Saving crash info to /computation/crash-20190816-124245-root-contrast_estimate-143b9426-8c69-488c-bd97-316f691edc12.pklz
Traceback (most recent call last):
File “/opt/miniconda/envs/default/lib/python3.5/site-packages/nipype/pipeline/plugins/linear.py”, line 44, in run
node.run(updatehash=updatehash)
File “/opt/miniconda/envs/default/lib/python3.5/site-packages/nipype/pipeline/engine/nodes.py”, line 471, in run
result = self._run_interface(execute=True)
File “/opt/miniconda/envs/default/lib/python3.5/site-packages/nipype/pipeline/engine/nodes.py”, line 555, in _run_interface
return self._run_command(execute)
File “/opt/miniconda/envs/default/lib/python3.5/site-packages/nipype/pipeline/engine/nodes.py”, line 635, in _run_command
result = self._interface.run(cwd=outdir)
File “/opt/miniconda/envs/default/lib/python3.5/site-packages/nipype/interfaces/base/core.py”, line 522, in run
runtime = self._run_interface(runtime)
File “/opt/miniconda/envs/default/lib/python3.5/site-packages/nipype/interfaces/spm/base.py”, line 377, in _run_interface
results = self.mlab.run()
File “/opt/miniconda/envs/default/lib/python3.5/site-packages/nipype/interfaces/base/core.py”, line 522, in run
runtime = self._run_interface(runtime)
File “/opt/miniconda/envs/default/lib/python3.5/site-packages/nipype/interfaces/matlab.py”, line 170, in _run_interface
self.raise_exception(runtime)
File “/opt/miniconda/envs/default/lib/python3.5/site-packages/nipype/interfaces/base/core.py”, line 975, in raise_exception
).format(**runtime.dictcopy()))
RuntimeError: Command:
/opt/spm12/run_spm12.sh /opt/mcr/v95 script /input/auditory_oddball/results/l2analysis/contrast_estimate/pyscript_estimatecontrast.m
Standard output:
SPM12, version 7507 (standalone)
MATLAB, version 9.5.0.944444 (R2018b)


/ )( _ ( / )
_
\ )
__/ ) ( Statistical Parametric Mapping
(/() (//_) SPM12 - https://www.fil.ion.ucl.ac.uk/spm/

Executing /input/auditory_oddball/results/l2analysis/contrast_estimate/pyscript_estimatecontrast.m at 16-Aug-2019 12:42:42:

MATLAB Version: 9.5.0.944444 (R2018b)
MATLAB License Number:
Operating System: Linux 4.9.184-linuxkit #1 SMP Tue Jul 2 22:58:16 UTC 2019 x86_64
Java Version: Java 1.8.0_152-b16 with Oracle Corporation Java HotSpot™ 64-Bit Server VM mixed mode

MATLAB Version 9.5 (R2018b)
FieldTrip Version unknown www.fieldtriptoolbox.org
MATLAB Compiler Version 7.0 (R2018b)
RICOH MEG Reader toolbox for MATLAB Version 1.0.2
Statistical Parametric Mapping Version 7507 (SPM12)
Yokogawa MEG Reader toolbox for MATLAB Version 1.5.1
Standard error:
MATLAB code threw an exception:
Condition Condition1 not found in design
File:/opt/spm12/spm12_mcr/spm/spm12/spm.m
Name:/opt/spm12/spm12_mcr/spm/spm12/spm_standalone.m
Line:115
File:pm
Name:spm_standalone
Line:1139
File:s
Name:
Return code: 0

190816-12:42:45,721 nipype.workflow INFO:
***********************************
190816-12:42:45,721 nipype.workflow ERROR:
could not run node: l2analysis.contrast_estimate
190816-12:42:45,721 nipype.workflow INFO:
crashfile: /computation/crash-20190816-124245-root-contrast_estimate-143b9426-8c69-488c-bd97-316f691edc12.pklz
190816-12:42:45,722 nipype.workflow INFO:
***********************************
Traceback (most recent call last):
File “./aa-spmglmpairedttest.py”, line 121, in
run_pipeline(input_params)
File “./aa-spmglmpairedttest.py”, line 99, in run_pipeline
l2analysis.run()
File “/opt/miniconda/envs/default/lib/python3.5/site-packages/nipype/pipeline/engine/workflows.py”, line 595, in run
runner.run(execgraph, updatehash=updatehash, config=self.config)
File “/opt/miniconda/envs/default/lib/python3.5/site-packages/nipype/pipeline/plugins/linear.py”, line 61, in run
report_nodes_not_run(notrun)
File “/opt/miniconda/envs/default/lib/python3.5/site-packages/nipype/pipeline/plugins/tools.py”, line 82, in report_nodes_not_run
raise RuntimeError(('Workflow did not execute cleanly. ’
RuntimeError: Workflow did not execute cleanly. Check log for details