help > Extracted Timecourse Problem
Showing 1-3 of 3 posts
Display:
Results per page:
Sep 5, 2017  04:09 PM | Andrew Poppe
Extracted Timecourse Problem
Hello,

I am new to gPPI in SPM, but I have run a similar model in FSL. I run an identical model in SPM and see what effect the deconvolution has on my results.
My input data for both analyses has already been preprocessed.


In FSL, I simply extracted the voxel timecourse from my preprocessed data (the voxel of interest) and used that as my physiological regressor.

In the PPPI setup, I have tried several things to replicate that, but so far to no avail.

--------------------
I read in one of these forums that I could directly set the P.VOI parameter to be a [NVols x 1] matrix with my timecourse, which would be ideal. But Whenever I try to do that I get an error when running PPPI.

Specifically, I set up the VOI matrix like so:


VOI = load('/path/to/timeseries.txt'); % a text file with one column of values, one value for each volume in the original data
% This results in a [718x1 double]

Then, I define the VOI parameter of the P structure
P.VOI = VOI;

When I run the PPPI command, I get this error:
ERROR 1: Program will exit. VOI is not specified.
One or more inputs are not correct.


-------------------------

I have also tried using a mask .nii image file, and that runs, but when I look at the physiological timecourse afterwards it doesn't look anything like the original timecourse extracted from the data. They correlated at about 0. I have verified as many ways as I can that I am extracting the correct voxel.

I am getting the timecourse from the last column of the *_regressors.txt file that is written when PPPI is called, but I have gotten the same data from the SPM.mat file that is saved in the PPI directory as well.

For reference, here is the output from the PPPI command when it runs:


Log File: S0022MVK1_PPPI_9_5_2017_6.log

PPPI Version: 13.1.4-17-2014

Parameters used:
Processing subject: S0022MVK1
VOI file : tester_mask.nii
Output file will be: S0022MVK1_tester_session#_cond_PPI_regressors.txt
Contrast : No adjustment
Analysis : Psychophysiological Interactions
Extraction : mean
Tasks : _0_DEC_NEG_DEC_POS_MAI_NEG_MAI_POS_MAI_NEU
Method : Condition Specific

VOI has 1 voxels in 1x1x1 space

VOI has 1 voxels in 1x1x1 space. This is in the the same space as the input data and functional mask.
Valid Contrast
Valid Contrast
Valid Contrast
Valid Contrast
Valid Contrast
Warning:
c is not a proper contrast in +c->Tsp in spm_SpUtil
!!! projecting...
> In spm_SpUtil at 327
In spm_FcUtil at 219
In spm_contrasts_PPI at 159
In PPPI at 887
In runPPI at 67
from

c =

0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0

to

c =

0
0
0
0
0
0
0
0
0
0
1.0000
0
0
0
0
0.0000
0

Warning:
c is not a proper contrast in +c->Tsp in spm_SpUtil
!!! projecting...
> In spm_SpUtil at 327
In spm_FcUtil at 219
In spm_contrasts_PPI at 159
In PPPI at 887
In runPPI at 67
from

c =

0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0

to

c =

0
0
0
0
0
0
0
0
0
0
0
1.0000
0
0
0
0.0000
0

Warning:
c is not a proper contrast in +c->Tsp in spm_SpUtil
!!! projecting...
> In spm_SpUtil at 327
In spm_FcUtil at 219
In spm_contrasts_PPI at 159
In PPPI at 887
In runPPI at 67
from

c =

0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0

to

c =

0
0
0
0
0
0
0
0
0
0
0
0
1.0000
0
0
0.0000
0

Warning:
c is not a proper contrast in +c->Tsp in spm_SpUtil
!!! projecting...
> In spm_SpUtil at 327
In spm_FcUtil at 219
In spm_contrasts_PPI at 159
In PPPI at 887
In runPPI at 67
from

c =

0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0

to

c =

0
0
0
0
0
0
0
0
0
0
0
0
0
1.0000
0
-0.0000
0

Warning:
c is not a proper contrast in +c->Tsp in spm_SpUtil
!!! projecting...
> In spm_SpUtil at 327
In spm_FcUtil at 219
In spm_contrasts_PPI at 159
In PPPI at 887
In runPPI at 67
from

c =

0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0

to

c =

0
0
0
0
0
0
0
0
0
0
0
0
0
0
1.0000
-0.0000
0

contrast image 6 : ...written con_0006.img
spm{T} image 6 : ...written spmT_0006.img
contrast image 7 : ...written con_0007.img
spm{T} image 7 : ...written spmT_0007.img
contrast image 8 : ...written con_0008.img
spm{T} image 8 : ...written spmT_0008.img
contrast image 9 : ...written con_0009.img
spm{T} image 9 : ...written spmT_0009.img
contrast image 10 : ...written con_0010.img
spm{T} image 10 : ...written spmT_0010.img
Moving Contrast Images
Moving Contrast Images
Moving Contrast Images
Moving Contrast Images
Moving Contrast Images


I guess my main question is, assuming the mask is correct, why would the extracted timeseries not resemble the timeseries for that voxel from my input data at all?

And is there a way to circumvent the extraction altogether and directly define my VOI's timeseries data?


Thanks for any help you can provide.

Andrew Poppe
Sep 5, 2017  06:09 PM | Donald McLaren
RE: Extracted Timecourse Problem
Hi Andrew,

Some very odd behavior in the scripts.

It should take in a numeric array without an issue, or at least get further than the error message its generating. What happens when you specify P.VOI, then run all(isnumeric(P.VOI))?

Do you get 1 or 0?

As for the mask, if you mask is a single voxel, then it should match FSL's timecourse -- are you using filtered_func.nii as the source in SPM and FSL?

If you send me your data, your mask, and the XYZ coordinate that you're trying to extract from, I can try and see what is going on with the program. I have some local tools for extracting data outside of the PPI toolbox and outside of the SPM.mat file.

Best,
Donald
Sep 5, 2017  07:09 PM | Andrew Poppe
RE: Extracted Timecourse Problem
Thank you for the quick reply!

When I run that command to test for numeric values, I get a 1.

I am actually using a somewhat odd dataset that actually represents the mean value of cortical parcels over time. I wouldn't expect that to have a bearing on this particular issue though. The data file is a nifti file that has the following dimensions:


dim1 387
dim2 1
dim3 1
dim4 718


In writing this, I just realized the answer might be that the analysis I ran in SPM prior to the PPPI may have altered the original data somehow even though it is already completely preprocessed. My unfamiliarity with SPM may have led me to leave on a filtering step or the like that altered the input data. Is that a possibility?

I have attached a zip file with the data file, my mask file, and the SPM.mat file from the GLM analysis. I'm trying to get data from the first voxel, 1,1,1 (1-indexed).

Thanks for your help!

Andrew
Attachment: data.zip