Print

Print


Hmm, that is strange! Anyways, I will create a local copy of palm_core for this particular project.

Second question: Are the values inside every voxel of *_cca1.nii.gz can be treated as effect size? Looks like no voxel passes FWE. I want to see if there is any effect of these 3 modalities.

Thanks

-Virendra

On Thu, Aug 10, 2017 at 10:43 AM, Anderson M. Winkler <[log in to unmask]> wrote:
Hi Virendra,

I cannot reproduce that error you received, even using same data and options. In any case, please don't use cell2mat. It may have worked in this case because of the specific inputs you have (that cell array has just one element, which is indeed a matrix) but that isn't a general solution. That error shouldn't appear anyway (it doesn't happen for me).

All the best,

Anderson


On 10 August 2017 at 12:09, neuroimage analyst <[log in to unmask]> wrote:
Thanks I will do that and let you know how it goes.

And my edits of dropping {o} and adding cell2mat to the lines in palm_core were fine?

Thanks

Regards 

Virendra 

On Aug 10, 2017 7:59 AM, "Anderson M. Winkler" <[log in to unmask]> wrote:
Hi Virendra,

In palm_core.m, line 1144, where it reads:

if opts.MV

please replace for:

if opts.MV || opts.CCA

That should be it. The next release will have that fixed. Thanks!

Also, you can drop C2. CCA will always rotate the axes to find the best (positive) correlation, so that can go away.

All the best,

Anderson


On 10 August 2017 at 11:00, neuroimage analyst <[log in to unmask]> wrote:
Hi,Anderson

Here is the log.

It goes through till here only after I do the above mentioned change , meaning cell2mat and removing the {o}

>>  palm -i gm.nii.gz -i wm.nii.gz -i non_pv_corrected.nii.gz -m MNI152_mask.nii -d PALM_CCA/Non_PV_Corrected/design.mat -t PALM_CCA/Non_PV_Corrected/contrast.con -n 100 -mv CCA -corrmod -corrcon -logp -demean -accel tail -noniiclass -nouncorrected.......................................................................
=======================================================================
             ___         ___                         ___
            /  /\       /  /\                       /__/\
           /  /::\     /  /::\                     |  |::\
          /  /:/\:\   /  /:/\:\    ___     ___     |  |:|:\
         /  /:/~/:/  /  /:/~/::\  /__/\   /  /\  __|__|:|\:\
        /__/:/ /:/  /__/:/ /:/\:\ \  \:\ /  /:/ /__/::::| \:\
        \  \:\/:/   \  \:\/:/__\/  \  \:\  /:/  \  \:\~~\__\/
         \  \::/     \  \::/        \  \:\/:/    \  \:\
          \  \:\      \  \:\         \  \::/      \  \:\
           \  \:\      \  \:\         \__\/        \  \:\
            \__\/       \__\/                       \__\/

=======================================================================
                 Permutation Analysis of Linear Models
=======================================================================
Running PALM alpha108 using MATLAB 9.1.0.441655 (R2016b) with the following options:
-i gm.nii.gz
-i wm.nii.gz
-i non_pv_corrected.nii.gz
-m MNI152_mask.nii
-d PALM_CCA/Non_PV_Corrected/design.mat
-t PALM_CCA/Non_PV_Corrected/contrast.con
-n 100
-mv CCA
-corrmod
-corrcon
-logp
-demean
-accel tail
-noniiclass
-nouncorrected
-savedof
-saveglm
-o PALM_CCA/Non_PV_Corrected/results
Reading input 1/3: gm.nii.gz
Reading input 2/3: wm.nii.gz
Reading input 3/3: non_pv_corrected.nii.gz
Reading design matrix and contrasts.
Elapsed time parsing inputs: ~ 49.4836 seconds.
Number of possible permutations is 1.08209e+27.
Generating 100 shufflings (permutations only).
Building null distribution.
Number of possible permutations is 1.08209e+27.
Generating 100 shufflings (permutations only).
Building null distribution.
Elapsed time with permutations: ~ 25120.2 seconds.
Computing p-values.
Saving p-values (uncorrected, and corrected within modality and within contrast).
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_fwep_m1_c1
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_fwep_m1_c2
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_fwep_m2_c1
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_fwep_m2_c2
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_fwep_m3_c1
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_fwep_m3_c2
Saving p-values (corrected across modalities).
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_mfwep_m1_c1
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_mfwep_m2_c1
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_mfwep_m3_c1
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_mfwep_m1_c2
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_mfwep_m2_c2
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_mfwep_m3_c2
Saving p-values (corrected across contrasts).
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_cfwep_m1_c1
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_cfwep_m1_c2
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_cfwep_m2_c1
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_cfwep_m2_c2
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_cfwep_m3_c1
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_cfwep_m3_c2
Saving p-values (corrected across modalities and contrasts).
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_mcfwep_m1_c1
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_mcfwep_m1_c2
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_mcfwep_m2_c1
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_mcfwep_m2_c2
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_mcfwep_m3_c1
         Saving file: PALM_CCA/Non_PV_Corrected/results_vox_tstat_mcfwep_m3_c2
Saving p-values for classical multivariate (uncorrected and corrected within contrast).
Index exceeds matrix dimensions.

Error in palm_competitive (line 113)
    unsrtR(:,c) = single(srtR(rev(:,c),c)); % original order as the data


Error in palm_pareto (line 90)
        [~,Gdist,Gcdf] = palm_competitive(Gdist,'ascend',true);


Error in palm_saveall (line 1349)
                    Ptosave =
                    palm_pareto(plm.Q{m}{c},plm.Qmax{m}{c},plm.mvrev{m}{c},opts.accel.tail_thr,opts.accel.G1out);


Error in palm_core (line 2484)
palm_saveall(plm,opts);


Error in palm (line 81)
palm_core(varargin{:});

Looking forward to your reply.

Thanks 
Regards 
Virendra 


On Thu, Aug 10, 2017 at 6:26 AM, Anderson M. Winkler <[log in to unmask]> wrote:
Hi Virendra,

I don't seem to be able to replicate the issue. Could you show the full command line and the full output you receive in the screen?

Thanks.

All the best,

Anderson

On 10 August 2017 at 00:33, neuroimage analyst <[log in to unmask]> wrote:
Hi, Anderson

I tried running the CCA in PALM using v108 but it complained about line
saying "Reference to a cleared variable o"
M = plm.Pset{p}*plm.Rz{y}{m}{c}{o}*plm.X{y}{m}{c}{o};

So I modified the line to:
M = plm.Pset{p}*cell2mat(plm.Rz{y}{m}{c})*plm.X{y}{m}{c};

and it is running fine.The reason I had to convert cell 2 mat as cell Matlab doesn't support cell multiplication.

The script did not finish running as yet but it has produced *_vox_cca_c1 and *_vox_cca_c2. These files are identical although c1 = 1 0 0 ... and c2 = -1 0 0 ...

Is this the expected behaviour? and whether the changes that I did in those lines are correct?

Thanks

Regards

Virendra

On Wed, Aug 9, 2017 at 7:04 AM, Anderson M. Winkler <[log in to unmask]> wrote:
Hi Virendra,

Just one call. It won't change what you'd like to test: after removing EV2, and the mean-centering that is done internally when CCA is used, the EV1 will be coding group differences. The contrasts should then be:

C1: [1 0 0 ...]
C2: [-1 0 0 ...]

That's it!

All the best,

Anderson


On 9 August 2017 at 10:40, neuroimage analyst <[log in to unmask]> wrote:
Thank you Anderson

So, should I then run CCA for the 2 groups separately in 2 different call to palm? How to set the contrast for 2 groups?

Thanks 

Regards 

Virendra 


On Aug 9, 2017 6:23 AM, "Anderson M. Winkler" <[log in to unmask]> wrote:
Hi Virendra,

I don't seem to be able to replicate the issue. Could you show the full command line and the full output you receive in the screen?

Thanks.

All the best,

Anderson

On 10 August 2017 at 00:33, neuroimage analyst <[log in to unmask]> wrote:
Hi, Anderson

I tried running the CCA in PALM using v108 but it complained about line
saying "Reference to a cleared variable o"
M = plm.Pset{p}*plm.Rz{y}{m}{c}{o}*plm.X{y}{m}{c}{o};

So I modified the line to:
M = plm.Pset{p}*cell2mat(plm.Rz{y}{m}{c})*plm.X{y}{m}{c};

and it is running fine.The reason I had to convert cell 2 mat as cell Matlab doesn't support cell multiplication.

The script did not finish running as yet but it has produced *_vox_cca_c1 and *_vox_cca_c2. These files are identical although c1 = 1 0 0 ... and c2 = -1 0 0 ...

Is this the expected behaviour? and whether the changes that I did in those lines are correct?

Thanks

Regards

Virendra

On Wed, Aug 9, 2017 at 7:04 AM, Anderson M. Winkler <[log in to unmask]> wrote:
Hi Virendra,

Just one call. It won't change what you'd like to test: after removing EV2, and the mean-centering that is done internally when CCA is used, the EV1 will be coding group differences. The contrasts should then be:

C1: [1 0 0 ...]
C2: [-1 0 0 ...]

That's it!

All the best,

Anderson


On 9 August 2017 at 10:40, neuroimage analyst <[log in to unmask]> wrote:
Thank you Anderson

So, should I then run CCA for the 2 groups separately in 2 different call to palm? How to set the contrast for 2 groups?

Thanks 

Regards 

Virendra 


On Aug 9, 2017 6:23 AM, "Anderson M. Winkler" <[log in to unmask]> wrote:
Hi Virendra,

Thanks for sending the files and for the patience.

This error can be fixed by replacing, in line 2047 of palm_core.m, where it reads:

for t = find(yselq),

for the following:

for t = find(yselq)',

That is, an apostrophe was missing, which caused the variable t being not a row but a column, which on its turn changes the behaviour of the for-loop.

In looking into this, it seems that there was also an issue with the intersection mask across modalities, which not being produced; this has now been fixed elsewhere in the code (it wouldn't affect your analysis, but could crash with different data). This has now been fixed too, in alpha108.

A separate comment on your data: the design has one column for each of the two groups. This is generally fine, except for CCA, where we mean-center all columns, and then the design becomes rank deficient. To get around it, and avoid warning messages, just remove the 2nd column of your design matrix and also the corresponding bits of the contrasts.

Hope this solves the problem. If not, please let me know. Thanks!

All the best,

Anderson


On 6 August 2017 at 22:30, neuroimage analyst <[log in to unmask]> wrote:
Hi, Anderson.

Thank you for looking into this. You should have received a dropbox link with all the relevant files in it. Please let me know if anything else is needed from me. I really appreciate your time and help.

Regards

Virendra

On Sun, Aug 6, 2017 at 4:03 PM, Anderson M. Winkler <[log in to unmask]> wrote:
Hi Virendra,

Could you send me your inputs, design files, etc? You can put in some online service like Dropbox and send me the link off-list then.

Thanks, and apologies for the persistent bug...

All the best,

Anderson


On 6 August 2017 at 11:28, neuroimage analyst <[log in to unmask]> wrote:
Thanks, Anderson.

However, it throws the following error now.

Undefined function 'qr' for input arguments of type 'double' and attributes
'full 3d real'.

Error in palm_core>cca (line 3197)
[Qy,~]  = qr(Y,0);

Error in palm_core (line 2048)
                                Q{m}{c}(t) =
                                cca(plm.Yq{m}{c}(:,:,t),M,opts.ccaparm);

Error in palm (line 81)
palm_core(varargin{:});

I would greatly appreciate your response.

Thanks

Regards

V

On Sun, Aug 6, 2017 at 5:01 AM, Anderson M. Winkler <[log in to unmask]> wrote:
Hi Virendra,

Thanks for letting me know. This should now be fixed in version alpha107. If the problem persists (or some other appears!) please feel free to ask again.

All the best,

Anderson


On 5 August 2017 at 01:43, neuroimage analyst <[log in to unmask]> wrote:
Hi, Anderson

I am trying to run PALM CCA for 3 modalities with the following line:

palm -i mod1.nii.gz -i mod2.nii.gz -i mod3.nii.gz -m mask.nii -d design.mat -t contrast.con -o results -npcmod -npccon -mv CCA -T -logp -accel tail -quiet -noniiclass -nouncorrected -savedof -saveparametric -Tnpc -demean -n 100

However, it throws an error:
Undefined operator '*' for input argument of type 'cell'
Error in palm_core (line 2044)
M=plm.Pset(p)*plm.Rz{m}{c}*plm.X{m}{c}
Error in palm (line 81)
palm_core(varargin(:))

I would greatly appreciate if you could please help me resolve this error.

Thanks

Regards

Virendra