help > sample data error
Dec 27, 2021  02:12 AM | sihua xu
sample data error
Hi
  I am new to gPPI
  when I run the gPPI and script_template for the sample data just below
  %Set current directory
workdir=pwd;
% Use spm_changepath to get the paths in the SPM.mat file correct after copying the data around.
spm_changepath([workdir filesep 'sampleData' filesep 'stats' filesep 'SPM.mat'],
'E:\PPI_test\running_gPPI_generic\test_gppi\sampleData\stats', [workdir filesep 'sampleData' filesep 'stats'] );
spm_changepath([workdir filesep 'sampleData' filesep 'stats' filesep 'SPM.mat'], 'E:\PPI_test\running_gPPI_generic\test_gppi', [workdir filesep 'sampleData' filesep] );
spm_changepath([workdir filesep 'sampleData' filesep 'stats' filesep 'SPM.mat'], 'swaKHUTCHISON+ALCOHOL GENETICS_07226+M87103240+20080417at144236+TASTE_V01_R03+CM', 'swaTaste_V01_R03_0009' );
spm_changepath([workdir filesep 'sampleData' filesep 'stats' filesep 'SPM.mat'], 'swaKHUTCHISON+ALCOHOL GENETICS_07226+M87103240+20080417at145242+TASTE_V01_R04+CM', 'swaTaste_V01_R04_0010' );

% Add the path to the gPPPI toolbox. I'm assuming SPM8 is already in the path.
spmpath=fileparts(which('spm.m'))
addpath([spmpath filesep 'toolbox']);
addpath([spmpath filesep 'toolbox' filesep 'PPPI']);
spm('defaults','fmri')
% Set up the control param structure P which determines the run
P.subject='sampleData_Study';
P.directory=[workdir filesep 'sampleData' filesep 'stats'];
P.VOI=[workdir filesep 'rmedPrecCing.nii'];
%P.VOI2=[workdir filesep 'rmedPrecCing.nii'];
P.Region='rmedPrec';
P.analysis='psy';
P.method='cond';
P.Estimate=1;
P.contrast=0;
P.extract='eig';
P.Tasks={'0' 'etoh_on_onsets_run1' 'etoh_off_onsets_run1' 'etoh_urge_onsets_run1' 'attn_on_onsets_run1' 'attn_off_onsets_run1' 'attn_urge_onsets_run1' 'etoh_on_onsets_run2' 'etoh_off_onsets_run2' 'etoh_urge_onsets_run2' 'attn_on_onsets_run2' 'attn_off_onsets_run2' 'attn_urge_onsets_run2' };
P.Weights=[];
P.equalroi=1;
P.FLmask=0;
P.CompContrasts=1;
% I don't *think* we need these but I may be wrong - Niles.
% P.maskdir='';
P.Contrasts(1).name='PPI_contrast1';
P.Contrasts(1).left={ 'etoh_on_onsets_run1' 'etoh_off_onsets_run1' 'etoh_urge_onsets_run1' 'attn_on_onsets_run1' };
P.Contrasts(1).right={ 'none' };
P.Contrasts(1).MinEvents=30;
P.Contrasts(1).STAT='T';
P.Contrasts(2).name='PPI_contrast2';
P.Contrasts(2).left={'etoh_on_onsets_run1' 'etoh_off_onsets_run1' 'etoh_urge_onsets_run1'};
P.Contrasts(2).right={'attn_on_onsets_run1' 'attn_off_onsets_run1' 'attn_urge_onsets_run1'};
P.Contrasts(2).MinEvents=30;
P.Contrasts(2).STAT='T';
PPPI(P, [workdir filesep 'sampleData' filesep 'stats' filesep 'gPPI_sampleDataTest.mat']);

Error in spm_changepath (line 57)
Cannot load "E:\PPI_test\running_gPPI_generic\test_gppi\sampleData\stats\SPM.mat".

Can you tell me what to do? Thanks for your help