help > unable to run runOnSampleData: 'Unrecognized field name "mat".'
Showing 1-2 of 2 posts
Aug 4, 2022 03:08 PM | Katie Surrence
unable to run runOnSampleData: 'Unrecognized field name "mat".'
Hi all,
I'm trying to get started with the gPPI toolbox, and I'm struggling to run the script runOnSampleData. Confusingly, the problem seems internal to SPM.
Here's the whole stack trace:
>> runOnSampleData
Error using spm_changepath
Cannot load
"/Users/katie/neuroimaging/NITRC-multi-file-downloads/running_gPPI_generic/sampleData/stats/SPM.mat".
I noticed that there was a file in the stats directory called spm_defaults.m that lacked this line that is in the file of that name in the SPM master repo:
defaults.mat.format = '-v6'; % options: '-mat', '-v6', '-v7.0', '-v7.3'
So I tried adding that line to the file, same error. I also tried deleting that file, same error. When I pause in the debugger the `defaults` struct has a bunch of other fields (`stats`, `mask`, `realign`, etc.) but no `mat`. I can find another way to rename paths in an SPM.mat file and try to move on from here, but I thought I would report it.
Thanks for your attention,
Katie
I'm trying to get started with the gPPI toolbox, and I'm struggling to run the script runOnSampleData. Confusingly, the problem seems internal to SPM.
Here's the whole stack trace:
>> runOnSampleData
Error using spm_changepath
Cannot load
"/Users/katie/neuroimaging/NITRC-multi-file-downloads/running_gPPI_generic/sampleData/stats/SPM.mat".
Error in runOnSampleData (line 4)
spm_changepath(['/Users/katie/neuroimaging/NITRC-multi-file-downloads/running_gPPI_generic' filesep 'sampleData' filesep 'stats' filesep 'SPM.mat'], '/export/research/analysis/human/khutchison/etohtaste_07226/AUTO_ANALYSIS/triotim/M87103240/Study20080417at142008/analysis/TASTE_IND_TIM/stats', ['/Users/katie/neuroimaging/NITRC-multi-file-downloads/running_gPPI_generic' filesep 'sampleData' filesep 'stats'] );
spm_changepath(['/Users/katie/neuroimaging/NITRC-multi-file-downloads/running_gPPI_generic' filesep 'sampleData' filesep 'stats' filesep 'SPM.mat'], '/export/research/analysis/human/khutchison/etohtaste_07226/AUTO_ANALYSIS/triotim/M87103240/Study20080417at142008/analysis/TASTE_IND_TIM/stats', ['/Users/katie/neuroimaging/NITRC-multi-file-downloads/running_gPPI_generic' filesep 'sampleData' filesep 'stats'] );
I noticed that there was a file in the stats directory called spm_defaults.m that lacked this line that is in the file of that name in the SPM master repo:
defaults.mat.format = '-v6'; % options: '-mat', '-v6', '-v7.0', '-v7.3'
So I tried adding that line to the file, same error. I also tried deleting that file, same error. When I pause in the debugger the `defaults` struct has a bunch of other fields (`stats`, `mask`, `realign`, etc.) but no `mat`. I can find another way to rename paths in an SPM.mat file and try to move on from here, but I thought I would report it.
Thanks for your attention,
Katie
Aug 4, 2022 08:08 PM | Katie Surrence
RE: unable to run runOnSampleData: 'Unrecognized field name "mat".'
In the end the way I found to resolve this (and apologies if this
had been previously mentioned in the forums but I couldn't find it
by searching) was to declare `global defaults` on the command line,
and then add mat.format field by hand.
I also renamed the `contains.m` file in the toolbox to `old_contains.m`.
This is still not working, in that I get the following output, but I'll try to contemplate this for a while before posting a new question.
runOnSampleData
spmpath =
'/Users/katie/neuroimaging/spm12'
P =
struct with fields:
subject: 'sampleData_Study'
directory: '/Users/katie/neuroimaging/NITRC-multi-file-downloads/running_gPPI_generic/sampleData/stats'
VOI: '/Users/katie/neuroimaging/NITRC-multi-file-downloads/running_gPPI_generic/rmedPrecCing.nii'
Region: 'rmedPrec'
analysis: 'psy'
method: 'cond'
Estimate: 1
contrast: 0
extract: 'eig'
Tasks: {1×13 cell}
Weights: []
equalroi: 1
FLmask: 0
CompContrasts: 1
Contrasts: [1×2 struct]
Log File: sampleData_Study_PPPI_8_4_2022_4.log
PPPI Version: 13.1.4-17-2014
Parameters used:
Processing subject: sampleData_Study
VOI file : /Users/katie/neuroimaging/NITRC-multi-file-downloads/running_gPPI_generic/rmedPrecCing.nii
Output file will be: sampleData_Study_rmedPrec_session#_cond_PPI_regressors.txt
Contrast : No adjustment
Analysis : Psychophysiological Interactions
Extraction : eigenvariate
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
Method : Condition Specific
VOI has 549 voxels in 3x3x3 space
VOI has 549 voxels in 3x3x3 space. This is in the the same space as the input data and functional mask.
VOI has 549 voxels in 3x3x3 space
VOI has 549 voxels in 3x3x3 space. This is in the the same space as the input data and functional mask.
Estimation Failed
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
PPI Contrasts were not estimated for some reason.
I also renamed the `contains.m` file in the toolbox to `old_contains.m`.
This is still not working, in that I get the following output, but I'll try to contemplate this for a while before posting a new question.
runOnSampleData
spmpath =
'/Users/katie/neuroimaging/spm12'
P =
struct with fields:
subject: 'sampleData_Study'
directory: '/Users/katie/neuroimaging/NITRC-multi-file-downloads/running_gPPI_generic/sampleData/stats'
VOI: '/Users/katie/neuroimaging/NITRC-multi-file-downloads/running_gPPI_generic/rmedPrecCing.nii'
Region: 'rmedPrec'
analysis: 'psy'
method: 'cond'
Estimate: 1
contrast: 0
extract: 'eig'
Tasks: {1×13 cell}
Weights: []
equalroi: 1
FLmask: 0
CompContrasts: 1
Contrasts: [1×2 struct]
Log File: sampleData_Study_PPPI_8_4_2022_4.log
PPPI Version: 13.1.4-17-2014
Parameters used:
Processing subject: sampleData_Study
VOI file : /Users/katie/neuroimaging/NITRC-multi-file-downloads/running_gPPI_generic/rmedPrecCing.nii
Output file will be: sampleData_Study_rmedPrec_session#_cond_PPI_regressors.txt
Contrast : No adjustment
Analysis : Psychophysiological Interactions
Extraction : eigenvariate
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
Method : Condition Specific
VOI has 549 voxels in 3x3x3 space
VOI has 549 voxels in 3x3x3 space. This is in the the same space as the input data and functional mask.
VOI has 549 voxels in 3x3x3 space
VOI has 549 voxels in 3x3x3 space. This is in the the same space as the input data and functional mask.
Estimation Failed
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
PPI Contrasts were not estimated for some reason.