Print

Print


Hi Lizanne,

Hmm, this seems an error that either shouldn't be there, or should be more friendly, telling what the problem is... sorry for that. Until this is sorted out, could you drop the option "-demean" and instead add an intercept to the model? If the problem persists, please let me know.

All the best,

Anderson


On 12 January 2016 at 18:18, Schweren, Lizanne <[log in to unmask]> wrote:
Hi Anderson,

Thank you for your help. Unfortunately I keep getting an error. I now get this:


>> aaa_runpalm

.......................................................................

Running PALM alpha72 using MATLAB with the following options:

-i /home/mrphys/lizsch/Desktop/r-hipp-vertex/regression-scaled/regression-match-r-hipp-scaled.nii

-m /home/mrphys/lizsch/Desktop/r-hipp-vertex/regression-scaled/regression-match-r-hipp-scaled-mask.nii

-evperdat /home/mrphys/lizsch/Desktop/r-hipp-vertex/regression-scaled/pvr-match-r-hipp-scaled.nii

-o /home/mrphys/lizsch/Desktop/r-hipp-vertex/regression-scaled/palm

-d /home/mrphys/lizsch/Desktop/r-hipp-vertex/regression-scaled/regression-match-design.mat

-t /home/mrphys/lizsch/Desktop/r-hipp-vertex/regression-scaled/regression-match-tcontrast.con

-demean

-T

-C 2.3

-n 10

Reading input 1/1: /home/mrphys/lizsch/Desktop/r-hipp-vertex/regression-scaled/regression-match-r-hipp-scaled.nii

Reading EV per datum 1/1: /home/mrphys/lizsch/Desktop/r-hipp-vertex/regression-scaled/pvr-match-r-hipp-scaled.nii

Reading design matrix and contrasts.

Error using bsxfun

Non-singleton dimensions of the two input arrays must match each other.


Error in palm_takeargs (line 2313)

        intercp = all(bsxfun(@eq,plm.Mset{m}(1,:),plm.Mset{m}),1);


Error in palm_core (line 32)

[opts,plm] = palm_takeargs(varargin{:});


Error in palm (line 80)

palm_core(varargin{:});


Error in aaa_runpalm (line 1)

palm -i

/home/mrphys/lizsch/Desktop/r-hipp-vertex/regression-scaled/regression-match-r-hipp-scaled.nii

...


Again attached are my design and contrast files. I shortened  the contrast file to 1 contrast, to make things easier.


As for the second question (the mask for the per-voxel regressor): I was hoping to achieve that I don't loose any voxels that have values in the per-voxel regressor nii, but are not included in the brain mask based on the input nifti. Does that make sense?


All my best and thanks again,

Lizanne

 

From: FSL - FMRIB's Software Library [[log in to unmask]] on behalf of Anderson M. Winkler [[log in to unmask]]
Sent: Tuesday, January 12, 2016 1:33 AM
To: [log in to unmask]
Subject: Re: [FSL] PALM per-voxel regressor

*oops: I meant not "a 9th EV containing any number" but instead "a 9th EV containing any numbers", i.e., any values.

On 12 January 2016 at 09:20, Anderson M. Winkler <[log in to unmask]> wrote:
Hi Lizanne,

Please, see below:


On 11 January 2016 at 23:44, Schweren, Lizanne <[log in to unmask]> wrote:
Dear experts,

I'm attempting to run a longitudinal analysis of hippocampal shape changes in PALM, where the baseline scan is entered as a per-voxel regressor. For input, I specify a 4D nifti file of hippocampus shape at follow-up (calculated from the concatenated .bvars using first_utils). For the per-voxel regressor, I specify a similar 4D nifti file but now at baseline. In my design.mat file I specify 8 EV's (not including the baseline per-voxel regressor). My contrast file has 8 contrasts, one for each EV in the design file.

palm -i {path}/Desktop/r-hipp-vertex/regression-scaled/regression-match-r-hipp-scaled.nii ...
-m {path}/Desktop/r-hipp-vertex/regression-scaled/regression-match-r-hipp-scaled-mask.nii ...
-evperdat {path}/Desktop/r-hipp-vertex/regression-scaled/pvr-match-r-hipp-scaled.nii  9 1 ...
-o {path}/Desktop/r-hipp-vertex/regression-scaled/palm ...
-d {path}/Desktop/r-hipp-vertex/regression-scaled/regression-match-design.mat ...
-t {path}/Desktop/r-hipp-vertex/regression-scaled/regression-match-tcontrast.con ...
-demean -T -C 2.3 -n 1000

My first question is: how do I specify the extra per-voxel regressor in my design and contrast files?

If e.g. I should add an extra column in the design.mat file, what should this column consist of? I've tried changing numWaves/numContrast/matrices to 9 instead of 8 in many different combinations, but PALM keeps giving me the reshape-error.

The design would contain dummy EVs, that later are replaced by the voxelwise data. So, you add for your current design, that has 8 EVs, a 9th EV containing any number (it can be all zeroes, all ones, or even repeat an already existing EV). This 9th EV will internally be replaced by the voxelwise data.

The contrast in the same way: it considers that the design has 9 EVs, and if the respective EV is marked as zero in the contrast, it will be treated as nuisance, otherwise it is considered part of the effect of interest to be tested.
 

My second question is: can I specify a new mask for the baseline-scans after the -evperdat line?

Each mask pairs up with an input, so no mask specific for the baseline scans. But maybe the same could be accomplished in different ways. What exactly would you like to do with the extra mask?
 

I've attached my design and contrast files (at this point with just the 8 other predictors). The design file is a .txt file because my email server won't send it as .mat . Thank you very much for your help!

Looks good, only need to add the extra EV to the design and contrast.

Note that -evperdat is very slow to run.

Cheers,

Anderson

 

All my best,
Lizanne