help > GPPPI failed - SPM12 - pmods
Showing 1-9 of 9 posts
Dec 21, 2017 09:12 PM | Maria Ironside - McLean Hospital
GPPPI failed - SPM12 - pmods
I'm trying to run GPPPI on a dataset I previously analysed using
SPM12.
I don't know if this is relevant but my first level SPM.mat files have more conditions than the four I specified in GPPPI and I also have a parametric modulator included in my first levels which I have not specified in the GPPPI.
I'm not getting an error message so I can't figure out where I could be going wrong.
Any help appreciated!
here's the P structure I set up:
%% specify ROI mask
P.VOI = 'K:\AAC\AAC_latest\analysis\second_level\ROIs_corrected\con_minus_noncon_mean_act_rACC.nii';
%% define region name
RegionName = 'con_minus_noncon_mean_act_rACC';
%% Creating a group folder
P.Region= RegionName;
P.GroupDir = ['K:\AAC\AAC_latest\analysis\PPI_group_level\' RegionName];
Group_Dir = P.GroupDir;
if ~exist(Group_Dir, 'dir')
mkdir(Group_Dir);
end
%% These are all PPI related variables that are identical for all subjects
P.Estimate=1;
P.contrast=0;
P.extract='eig';
P.Weights=[];
P.method='cond';
P.analysis='psy';
P.CompContrasts=1;
P.Weighted=0;
P.equalroi=0;
P.Tasks= {'0' 'ap_ap_decision' 'av_av_decision' 'con_ap_decision' 'con_av_decision'};
for i = 1:4
P.Contrasts(i).left=P.Tasks(i+1);
P.Contrasts(i).right={'None'};
P.Contrasts(i).STAT='T';
P.Contrasts(i).MinEvents=2;
P.Contrasts(i).name=P.Tasks(i+1);
end
P.Contrasts(5).left=P.Tasks(2);
P.Contrasts(5).right=P.Tasks(3);
P.Contrasts(5).STAT='T';
P.Contrasts(5).MinEvents=2;
P.Contrasts(5).name='ap_ap_minus_av_av';
P.Contrasts(6).left=P.Tasks(4);
P.Contrasts(6).right=P.Tasks(5);
P.Contrasts(6).STAT='T';
P.Contrasts(6).MinEvents=2;
P.Contrasts(6).name='con_ap_minus_con_av';
I don't know if this is relevant but my first level SPM.mat files have more conditions than the four I specified in GPPPI and I also have a parametric modulator included in my first levels which I have not specified in the GPPPI.
I'm not getting an error message so I can't figure out where I could be going wrong.
Any help appreciated!
here's the P structure I set up:
%% specify ROI mask
P.VOI = 'K:\AAC\AAC_latest\analysis\second_level\ROIs_corrected\con_minus_noncon_mean_act_rACC.nii';
%% define region name
RegionName = 'con_minus_noncon_mean_act_rACC';
%% Creating a group folder
P.Region= RegionName;
P.GroupDir = ['K:\AAC\AAC_latest\analysis\PPI_group_level\' RegionName];
Group_Dir = P.GroupDir;
if ~exist(Group_Dir, 'dir')
mkdir(Group_Dir);
end
%% These are all PPI related variables that are identical for all subjects
P.Estimate=1;
P.contrast=0;
P.extract='eig';
P.Weights=[];
P.method='cond';
P.analysis='psy';
P.CompContrasts=1;
P.Weighted=0;
P.equalroi=0;
P.Tasks= {'0' 'ap_ap_decision' 'av_av_decision' 'con_ap_decision' 'con_av_decision'};
for i = 1:4
P.Contrasts(i).left=P.Tasks(i+1);
P.Contrasts(i).right={'None'};
P.Contrasts(i).STAT='T';
P.Contrasts(i).MinEvents=2;
P.Contrasts(i).name=P.Tasks(i+1);
end
P.Contrasts(5).left=P.Tasks(2);
P.Contrasts(5).right=P.Tasks(3);
P.Contrasts(5).STAT='T';
P.Contrasts(5).MinEvents=2;
P.Contrasts(5).name='ap_ap_minus_av_av';
P.Contrasts(6).left=P.Tasks(4);
P.Contrasts(6).right=P.Tasks(5);
P.Contrasts(6).STAT='T';
P.Contrasts(6).MinEvents=2;
P.Contrasts(6).name='con_ap_minus_con_av';
Dec 21, 2017 09:12 PM | Donald McLaren
RE: GPPPI failed - SPM12 - pmods
Hi Maria,
What exactly failed?
Your gPPI Model should have 8 condition columns (4 tasks, 4 pmod), 8 PPI columns 1 for each of the 8 conditions, seed region, and any covariates.
Best,
Donald
What exactly failed?
Your gPPI Model should have 8 condition columns (4 tasks, 4 pmod), 8 PPI columns 1 for each of the 8 conditions, seed region, and any covariates.
Best,
Donald
Dec 28, 2017 05:12 PM | Maria Ironside - McLean Hospital
RE: GPPPI failed - SPM12 - pmods
Hi Donald,
Thanks for your response.
This is the error I am getting. I guess it means that the PPPI inputs are fine and it is some other error.
Any idea how I would troubleshoot?
Thanks,
Maria
ERROR 1: PPPI inputs were specified correctly, but failed error checking for dependencies. This is likely a bug in the program.
One or more inputs are not correct.
Thanks for your response.
This is the error I am getting. I guess it means that the PPPI inputs are fine and it is some other error.
Any idea how I would troubleshoot?
Thanks,
Maria
ERROR 1: PPPI inputs were specified correctly, but failed error checking for dependencies. This is likely a bug in the program.
One or more inputs are not correct.
Dec 29, 2017 12:12 AM | Donald McLaren
RE: GPPPI failed - SPM12 - pmods
It looks like your missing P.directory in the specification of the
P parameter structure. This should be the location of the
first-level task SPM.mat file.
Can you set this and try again. If you still get an error, I'll have to take a closer look to identify which line might be causing an issue.
-Donald
Can you set this and try again. If you still get an error, I'll have to take a closer look to identify which line might be causing an issue.
-Donald
Jan 24, 2018 04:01 PM | Maria Ironside - McLean Hospital
RE: GPPPI failed - SPM12 - pmods - writing new cons to SPM.mat
Hi Donald,
I wanted to update that I resolved this issue.
The silly problem was that we had moved the preprocessed EPI files to another server (I had the P.directory specified but had missed it in my message).
There wasn't a specific error about not being able to find the file, which might be useful for a future update.
I have been writing some new contrasts to my PPI model (just using spm_FcUtil) and I wanted to ask about something.
When I ran the initial gPPPI the resultant con images are .img rather than .nii and when I try to reevaluate them using spm_contrasts I only get the con files for the ones which I have added (and not the ones which I also can see in the model, but were written by GPPPI). SPM doesn't like these .img files for further analysis. Obviously I can just change the extension to .nii but I wanted to check that there isn't some reason to have .img files instead? Sorry if this is a silly question.
It all seems to work fine when I just rewrite the contrasts (which were initially written by GPPI) to the model and then run spm_contrasts.
Does this compromise the model at all? I was just unsure if there was something about the way that GPPPI sets up these contrasts. I had a look in both models and they seem identical (apart from SPM.xCon(1).Vspm.fname which is now a .nii file rather than an .img file). It seems to me all the gPPPI information is in the first level conditions and therefore I can treat these beta weights going forward as if they are a standard task based fMRI analysis. Can you confirm?
Best,
Maria
I wanted to update that I resolved this issue.
The silly problem was that we had moved the preprocessed EPI files to another server (I had the P.directory specified but had missed it in my message).
There wasn't a specific error about not being able to find the file, which might be useful for a future update.
I have been writing some new contrasts to my PPI model (just using spm_FcUtil) and I wanted to ask about something.
When I ran the initial gPPPI the resultant con images are .img rather than .nii and when I try to reevaluate them using spm_contrasts I only get the con files for the ones which I have added (and not the ones which I also can see in the model, but were written by GPPPI). SPM doesn't like these .img files for further analysis. Obviously I can just change the extension to .nii but I wanted to check that there isn't some reason to have .img files instead? Sorry if this is a silly question.
It all seems to work fine when I just rewrite the contrasts (which were initially written by GPPI) to the model and then run spm_contrasts.
Does this compromise the model at all? I was just unsure if there was something about the way that GPPPI sets up these contrasts. I had a look in both models and they seem identical (apart from SPM.xCon(1).Vspm.fname which is now a .nii file rather than an .img file). It seems to me all the gPPPI information is in the first level conditions and therefore I can treat these beta weights going forward as if they are a standard task based fMRI analysis. Can you confirm?
Best,
Maria
Jan 24, 2018 04:01 PM | Maria Ironside - McLean Hospital
RE: GPPPI failed - SPM12 - pmods - writing new cons to SPM.mat
I attached the original SPM design file to the last message and I
attach the one with my rewritten contrasts to this one.
Thanks for the help!
Thanks for the help!
Jan 24, 2018 04:01 PM | Donald McLaren
RE: GPPPI failed - SPM12 - pmods - writing new cons to SPM.mat
The new SPM.mat file was not attached.
Jan 24, 2018 05:01 PM | Donald McLaren
RE: GPPPI failed - SPM12 - pmods - writing new cons to SPM.mat
Ah. Yes. Moving the input files will cause an issue. I'll try and
figure out how to make this error message clearer if this is the
case in the next release.
Contrast Comments:
(1) spm_contrasts will default to only estimating contrasts that don't have a Vcon field. This is why it skips over existing contrasts.
(2) spm_contrasts for generating contrasts is the same as using spm_contrasts_ppi. There is no difference and it will not impact the model in anyway. The betas can be treated identically to how they are treated in a task-based fMRI analysis.
(3) nii versus img file naming is an issue with the script. I've attached a newer version called spm_contrasts_gPPI. If you rename this new file with spm_contrasts_ppi, and replace the old file, then the files should correctly have .nii extension again.
Let me know if you have any other issues. I hope to have a new python/SPM based package completed by this summer.
Contrast Comments:
(1) spm_contrasts will default to only estimating contrasts that don't have a Vcon field. This is why it skips over existing contrasts.
(2) spm_contrasts for generating contrasts is the same as using spm_contrasts_ppi. There is no difference and it will not impact the model in anyway. The betas can be treated identically to how they are treated in a task-based fMRI analysis.
(3) nii versus img file naming is an issue with the script. I've attached a newer version called spm_contrasts_gPPI. If you rename this new file with spm_contrasts_ppi, and replace the old file, then the files should correctly have .nii extension again.
Let me know if you have any other issues. I hope to have a new python/SPM based package completed by this summer.
Jan 24, 2018 05:01 PM | Maria Ironside - McLean Hospital
RE: GPPPI failed - SPM12 - pmods - writing new cons to SPM.mat
Thanks so much for the prompt response Donald! I really appreciate
the help.
Seems like I don't need to send the SPM.mat file now as all is well.
Thanks again!
Seems like I don't need to send the SPM.mat file now as all is well.
Thanks again!
