help > Error Invalid Contrast -- Attempted Patch;
Showing 1-9 of 9 posts
Display:
Results per page:
May 18, 2016  01:05 PM | Daniel Cole - Emory University
Error Invalid Contrast -- Attempted Patch;
Hello gPPIers,

Thank you for taking time to look at my issue.
I'm having trouble getting a PPI analysis to work and am receiving the error "Warning: Missing conditions!!! Invalid Contrast". I've gotten the SPM.mat to create but it fails when it attempts to do estimate. By suggestion of Dr. McLaren I have replaced my spm_estimate file with the patched version and attempted to re-run the analysis. With the patched file my SPM.mat is not created and I receive the same error message.
Any ideas on things to try/look at are much appreciated. Please let me know if you need more information or any files to help identify the problem.

Thank you,
Dan
Attachment: ppi_wrapper.m
May 19, 2016  11:05 AM | Donald McLaren
RE: Error Invalid Contrast -- Attempted Patch;
Daniel,

Can you make sure that you are using the most updated version of the toolbox? The most recent version on the nitrc doesn't require the patch and has an option to switch between slice-wise and whole-brain estimation. If estimation fails, then set P.WB=0 in your config file for this study.

Can you attach the entire screen output?

Best,
Donald
Originally posted by Daniel Cole:
Hello gPPIers,

Thank you for taking time to look at my issue.
I'm having trouble getting a PPI analysis to work and am receiving the error "Warning: Missing conditions!!! Invalid Contrast". I've gotten the SPM.mat to create but it fails when it attempts to do estimate. By suggestion of Dr. McLaren I have replaced my spm_estimate file with the patched version and attempted to re-run the analysis. With the patched file my SPM.mat is not created and I receive the same error message.
Any ideas on things to try/look at are much appreciated. Please let me know if you need more information or any files to help identify the problem.

Thank you,
Dan
May 19, 2016  06:05 PM | Daniel Cole - Emory University
RE: Error Invalid Contrast -- Attempted Patch;
Hi Dr. McClaren thank you for taking the time.

I re-downloaded the gPPI and made sure that it was active in the path, yet I received the same error.  I also tried with my ppi_wrapper script having P.WB = 0 and also received the same error.

Here is the full text:
Controls
Processing Group 1
Subject 1
Saving 04_analysis_rMRS_ROI_1.mat


ans =
04_analysis_rMRS_ROI_1.mat
Log File: 04_PPPI_5_19_2016_2.log
PPPI Version: 13.1.4-17-2014
Parameters used:
Processing subject: 04
VOI file : /Volumes/Promise_Pegasus/Active_Studies/K99/MRI_Data/Second_Levels/MASKS/rMRS_ROI_1.nii
Output file will be: 04_rMRS_ROI_1_session#_cond_PPI_regressors.txt
Contrast : No adjustment
Analysis : Psychophysiological Interactions
Extraction : mean
Tasks : _1_Fdbk_Wins_Fdbk_Losses_Win_Cue_Loss_Cue_Neu_Cue_Neu_Fdbk
Method : Condition Specific
VOI has 1331 voxels in 2x2x2 space
VOI has 1331 voxels in 2x2x2 space. This is in the the same space as the input data and functional mask.
VOI has 1331 voxels in 2x2x2 space
VOI has 1331 voxels in 2x2x2 space. This is in the the same space as the input data and functional mask.
SPM8: spm_fMRI_design (v4185) 14:57:34 - 19/05/2016
========================================================================
Saving fMRI design : ...SPM.mat saved
SPM8: spm_fmri_spm_ui (v4421) 14:57:35 - 19/05/2016
========================================================================
Mapping files : ...done
Calculating globals : ...done
Saving SPM configuration : ...SPM.mat saved
Design reporting : Estimation Failed
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
PPI Contrasts were not estimated for some reason.
May 20, 2016  02:05 AM | Donald McLaren
RE: Error Invalid Contrast -- Attempted Patch;
Daniel,

Definitely something wrong here.

If you load the SPM.mat that was created, then type spm(SPM)

What happens?



Best,
Donald 
Originally posted by Daniel Cole:
Hi Dr. McClaren thank you for taking the time.

I re-downloaded the gPPI and made sure that it was active in the path, yet I received the same error.  I also tried with my ppi_wrapper script having P.WB = 0 and also received the same error.

Here is the full text:
Controls
Processing Group 1
Subject 1
Saving 04_analysis_rMRS_ROI_1.mat


ans =
04_analysis_rMRS_ROI_1.mat
Log File: 04_PPPI_5_19_2016_2.log
PPPI Version: 13.1.4-17-2014
Parameters used:
Processing subject: 04
VOI file : /Volumes/Promise_Pegasus/Active_Studies/K99/MRI_Data/Second_Levels/MASKS/rMRS_ROI_1.nii
Output file will be: 04_rMRS_ROI_1_session#_cond_PPI_regressors.txt
Contrast : No adjustment
Analysis : Psychophysiological Interactions
Extraction : mean
Tasks : _1_Fdbk_Wins_Fdbk_Losses_Win_Cue_Loss_Cue_Neu_Cue_Neu_Fdbk
Method : Condition Specific
VOI has 1331 voxels in 2x2x2 space
VOI has 1331 voxels in 2x2x2 space. This is in the the same space as the input data and functional mask.
VOI has 1331 voxels in 2x2x2 space
VOI has 1331 voxels in 2x2x2 space. This is in the the same space as the input data and functional mask.
SPM8: spm_fMRI_design (v4185) 14:57:34 - 19/05/2016
========================================================================
Saving fMRI design : ...SPM.mat saved
SPM8: spm_fmri_spm_ui (v4421) 14:57:35 - 19/05/2016
========================================================================
Mapping files : ...done
Calculating globals : ...done
Saving SPM configuration : ...SPM.mat saved
Design reporting : Estimation Failed
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
PPI Contrasts were not estimated for some reason.
May 23, 2016  04:05 PM | Daniel Cole - Emory University
RE: Error Invalid Contrast -- Attempted Patch;
Is this because I am using spm8?

>> spm(SPM)
SWITCH expression must be a scalar or string constant.

Error in spm (line 297)
switch lower(Action), case 'welcome' %-Welcome splash screen

>> which spm
/Volumes/Promise_Pegasus/Software/spm8/spm.m
May 23, 2016  04:05 PM | Donald McLaren
RE: Error Invalid Contrast -- Attempted Patch;
No - typo in my response. See correct commands below.

I meant to have you do:
(1) Change to the SPM.mat directory;
(2) Type: load SPM.mat
(3) Type: spm_spm(SPM)

Try it with spm_spm(SPM).

Best,
Donald
Originally posted by Daniel Cole:
Is this because I am using spm8?

>> spm(SPM)
SWITCH expression must be a scalar or string constant.

Error in spm (line 297)
switch lower(Action), case 'welcome' %-Welcome splash screen

>> which spm
/Volumes/Promise_Pegasus/Software/spm8/spm.m
May 23, 2016  09:05 PM | Daniel Cole - Emory University
RE: Error Invalid Contrast -- Attempted Patch;
It appears to have run through!  Any ideas what happened there?


>> spm_spm(SPM)

SPM8: spm_spm (v4515) 17:21:37 - 23/05/2016
========================================================================
Initialising parameters : ...done
Plane 68/68 , block 1/1 : ...done
Temporal non-sphericity (over voxels) : ...ReML estimation
ReML Block 1
ReML Iteration 1 : ...1.806630e+01 [+4.25]
ReML Iteration 2 : ...2.672862e-07 [+4.50]
ReML Block 2
ReML Iteration 1 : ...1.746450e+01 [+4.25]
ReML Iteration 2 : ...5.993750e-06 [+4.50]
SPM8: spm_spm (v4515) 17:22:17 - 23/05/2016
========================================================================
Initialising parameters : ...done
Output images : ...initialised
Plane 68/68 , block 1/1 : ...done
Spatial non-sphericity (over scans) : ...done
Saving results : ...done
Completed : 17:22:55 - 23/05/2016
...use the results section for assessment
ans =
swd: [1x99 char]
xBF: [1x1 struct]
xY: [1x1 struct]
nscan: [216 216]
SPMid: 'SPM8: spm_spm (v4515)'
xVi: [1x1 struct]
xGX: [1x1 struct]
xX: [1x1 struct]
Sess: [1x2 struct]
xM: [1x1 struct]
xsDes: [1x1 struct]
xVol: [1x1 struct]
Vbeta: [1x56 struct]
VResMS: [1x1 struct]
VM: [1x1 struct]
xCon: [0x0 struct]
May 27, 2016  03:05 PM | Donald McLaren
RE: Error Invalid Contrast -- Attempted Patch;
Nope. No idea. I've seen some weird things happen with SPM and Matlab before. 
There may have been some files that were bad and SPM over-wrote them as part of the estimate procedure, but the gPPI code isn't built to overwrite them.

If you run a new subject, does it the gPPI code run to completion?

Best,
Donald
May 31, 2016  05:05 PM | Daniel Cole - Emory University
RE: Error Invalid Contrast -- Attempted Patch;
Thanks for the follow-up.  No the other subjects had to be forced through as well.  It ended up including PPI regressors for all of our contrasts and not only the ones we specified in our P structure, is this intended?  I was under the impression that you could run the PPI analysis on a few select conditions and not on others.

Thanks again for the help,
Dan