help > ppi wrapper error
Showing 1-5 of 5 posts
Oct 22, 2015 09:10 AM | Ming-Ching Wen
ppi wrapper error
Dear Dr. McLaren:
Thanks for the exciting toolbox. As a beginner of gPPI, I managed to set up the parameters of ppi wrapper for an even-related fMRI task. However, when trying to run it, I was given the following error:
??? Input argument "regionnumber" is undefined.
Error in ==> ppi_wrapper_SWM at 19
P.VOI=regionfile{regionnumber};
The wrapper is as follows and the ppi_master_template I used is attached here. Any pointers are very miuch appreciated.
------------------------------------------------------------------------------
function ppi_wrapper(regionnumber,firstsubject,lastsubject)
%User input required (directories and subjects)
addpath('/mnt/HZLServer/matlab_toolboxes/spm8/toolbox/gPPI/PPPIv13')
addpath('/mnt/HZLServer/matlab_toolboxes/spm8')
Subjects={'TCRP004' 'TCRP005'};
%User input required (region files)
regionfile={'/mnt/HZLHD1/TCRP/data/TCRP004-1/Process/SpatialWM-fMRI/spm/1st_level/VOI_5_-70_32_mask.nii' '/mnt/HZLHD1/TCRP/data/TCRP004-1/Process/SpatialWM-fMRI/spm/1st_level/VOI_10_30_20'};
%'VPC1_sphere_roi.mat' 'VPC2_sphere_roi2.mat'};
%User input required (region names)
region={'VOI_5_-70_32' 'VOI_10_30_20'};
%'VPC1' 'VPC2'};
%User input required (master template)
load('/mnt/HZLHD1/gPPI/TCRP_ppi_master_template.mat')
P.VOI=regionfile{regionnumber};
P.Region=region{regionnumber};
for i=1:14;
%User input required (change directory to where the input structure should
%be saved)
save(['/mnt/HZLHD1/TCRP/data/' Subjects{i} '/Process/SpatialWM-fMRI/concate/1st_level/' region{regionnumber} '.mat'],'P');
try
%User input required directory of SPM.mat files
Directory=['/mnt/HZLHD1/TCRP/data/' Subjects{i} '/Process/SpatialWM-fMRI/concate/1st_level/'];
cd(Directory)
%User input required (directory same as line 23 above)
load(['/mnt/HZLHD1/TCRP/data/' Subjects{i} '/Process/SpatialWM-fMRI/concate/1st_level/' region{regionnumber} '.mat']);
P.subject=Subjects{i};
P.directory=Directory;
%User input required (change analysis to be more specific)
save([Subjects{i} '_analysis_' region{regionnumber} '.mat'],'P');
PPPI([Subjects{i} '_analysis_' region{regionnumber} '.mat']);
catch
disp(['Failed: ' Subjects{i}])
end
end
end
Thanks for the exciting toolbox. As a beginner of gPPI, I managed to set up the parameters of ppi wrapper for an even-related fMRI task. However, when trying to run it, I was given the following error:
??? Input argument "regionnumber" is undefined.
Error in ==> ppi_wrapper_SWM at 19
P.VOI=regionfile{regionnumber};
The wrapper is as follows and the ppi_master_template I used is attached here. Any pointers are very miuch appreciated.
------------------------------------------------------------------------------
function ppi_wrapper(regionnumber,firstsubject,lastsubject)
%User input required (directories and subjects)
addpath('/mnt/HZLServer/matlab_toolboxes/spm8/toolbox/gPPI/PPPIv13')
addpath('/mnt/HZLServer/matlab_toolboxes/spm8')
Subjects={'TCRP004' 'TCRP005'};
%User input required (region files)
regionfile={'/mnt/HZLHD1/TCRP/data/TCRP004-1/Process/SpatialWM-fMRI/spm/1st_level/VOI_5_-70_32_mask.nii' '/mnt/HZLHD1/TCRP/data/TCRP004-1/Process/SpatialWM-fMRI/spm/1st_level/VOI_10_30_20'};
%'VPC1_sphere_roi.mat' 'VPC2_sphere_roi2.mat'};
%User input required (region names)
region={'VOI_5_-70_32' 'VOI_10_30_20'};
%'VPC1' 'VPC2'};
%User input required (master template)
load('/mnt/HZLHD1/gPPI/TCRP_ppi_master_template.mat')
P.VOI=regionfile{regionnumber};
P.Region=region{regionnumber};
for i=1:14;
%User input required (change directory to where the input structure should
%be saved)
save(['/mnt/HZLHD1/TCRP/data/' Subjects{i} '/Process/SpatialWM-fMRI/concate/1st_level/' region{regionnumber} '.mat'],'P');
try
%User input required directory of SPM.mat files
Directory=['/mnt/HZLHD1/TCRP/data/' Subjects{i} '/Process/SpatialWM-fMRI/concate/1st_level/'];
cd(Directory)
%User input required (directory same as line 23 above)
load(['/mnt/HZLHD1/TCRP/data/' Subjects{i} '/Process/SpatialWM-fMRI/concate/1st_level/' region{regionnumber} '.mat']);
P.subject=Subjects{i};
P.directory=Directory;
%User input required (change analysis to be more specific)
save([Subjects{i} '_analysis_' region{regionnumber} '.mat'],'P');
PPPI([Subjects{i} '_analysis_' region{regionnumber} '.mat']);
catch
disp(['Failed: ' Subjects{i}])
end
end
end
Oct 22, 2015 09:10 AM | Ming-Ching Wen
RE: ppi wrapper error
Hi again,
Attached the wrong file in the previous posting.
Here is the correct one.
Thanks.
Attached the wrong file in the previous posting.
Here is the correct one.
Thanks.
Oct 22, 2015 02:10 PM | Donald McLaren
RE: ppi wrapper error
I'm currently away from my computer
with matlab installed, so I can't check the parameter file.
However, the error is unrelated to the parameter file.
However, the error is unrelated to the parameter file.
Oct 23, 2015 12:10 AM | Ming-Ching Wen
RE: ppi wrapper error
Hi Dr. MaLaren:
I see. Thanks for the clarification.
Please let me know your further comments/ suggestions when you have a chance to look at the pip_master_template.
Ming-Ching
I see. Thanks for the clarification.
Please let me know your further comments/ suggestions when you have a chance to look at the pip_master_template.
Ming-Ching
Oct 26, 2015 05:10 PM | Donald McLaren
RE: ppi wrapper error
Ming-Ching,
Two comments about the master file:
(1) There are no contrasts specified; and
(2) Depending on the design, you may want to specify the weighted field.
The program should run without setting these fields, but you will get no contrast images.
-Donald
Two comments about the master file:
(1) There are no contrasts specified; and
(2) Depending on the design, you may want to specify the weighted field.
The program should run without setting these fields, but you will get no contrast images.
-Donald
