Still error when using CWAS after your instruction

Submitted by louislin28 on

Hi,

Sorry to re-post this message.

I followed your instruction to revise the script as suggested, however I came across another error:

Warning: File: DPARSFA_run.m Line: 673 Column: 66
The temporary variable SliceOrder will be cleared at the beginning of each iteration of the parfor loop.
Any value assigned to it before the loop will be lost.  If SliceOrder is used before it is assigned in
the parfor loop, a runtime error will occur.
See Parallel for Loops in MATLAB, "Temporary Variables". 
> In DPARSFA>pushbuttonRun_Callback at 1674
  In gui_mainfcn at 96
  In DPARSFA at 30 
Warning: File: DPARSFA_run.m Line: 928 Column: 83
The temporary variable RefFile will be cleared at the beginning of each iteration of the parfor loop.
Any value assigned to it before the loop will be lost.  If RefFile is used before it is assigned in
the parfor loop, a runtime error will occur.
See Parallel for Loops in MATLAB, "Temporary Variables". 
> In DPARSFA>pushbuttonRun_Callback at 1674
  In gui_mainfcn at 96
  In DPARSFA at 30 
Warning: File: DPARSFA_run.m Line: 2632 Column: 24
The temporary variable DirImg will be cleared at the beginning of each iteration of the parfor loop.
Any value assigned to it before the loop will be lost.  If DirImg is used before it is assigned in
the parfor loop, a runtime error will occur.
See Parallel for Loops in MATLAB, "Temporary Variables". 
> In DPARSFA>pushbuttonRun_Callback at 1674
  In gui_mainfcn at 96
  In DPARSFA at 30 
Warning: File: DPARSFA_run.m Line: 4205 Column: 32
The temporary variable DirImg will be cleared at the beginning of each iteration of the parfor loop.
Any value assigned to it before the loop will be lost.  If DirImg is used before it is assigned in
the parfor loop, a runtime error will occur.
See Parallel for Loops in MATLAB, "Temporary Variables". 
> In DPARSFA>pushbuttonRun_Callback at 1674
  In gui_mainfcn at 96
  In DPARSFA at 30 
 
Resample Masks (/Users/hsiangyuanlin/Documents/MATLAB/DPABI_V1.3_150710/Templates/BrainMask_05_91x109x91.img) to the resolution of functional images.
 
Resample Masks (/Users/hsiangyuanlin/Documents/MATLAB/DPABI_V1.3_150710/Templates/CsfMask_07_91x109x91.img) to the resolution of functional images.
 
Resample Masks (/Users/hsiangyuanlin/Documents/MATLAB/DPABI_V1.3_150710/Templates/WhiteMask_09_91x109x91.img) to the resolution of functional images.
 
Resample Masks (/Users/hsiangyuanlin/Documents/MATLAB/DPABI_V1.3_150710/Templates/GreyMask_02_91x109x91.img) to the resolution of functional images.
Warning: Directory already exists. 
> In DPARSFA_run at 3987
  In DPARSFA>pushbuttonRun_Callback at 1674
  In gui_mainfcn at 96
  In DPARSFA at 30 
 
Computing CWAS with: "/Users/hsiangyuanlin/Documents/ADHD_Sib/FunImgARWSFC"
Reading images from "/Users/hsiangyuanlin/Documents/ADHD_Sib/FunImgARWSFC/ConS_6307/CovRegressed_4DVolume_4mm.nii" etc.
Error using initclient (line 37)
Java exception occurred:
java.lang.NullPointerException
at java.util.logging.Logger.demandLogger(Logger.java:286)
at java.util.logging.Logger.getLogger(Logger.java:321)
 
Error in distcomp/schema (line 11)
initclient;
 
Error in parallel_function (line 430)
if W > 0 && PCTInstalled && distcomp.remoteparfor.tryRemoteParfor
 
Error in y_CWAS (line 60)
parfor i = 1:nSubjectNum
 
Error in DPARSFA_run (line 3990)
        [p_Brain, F_Brain, Header] =
        y_CWAS([AutoDataProcessParameter.DataProcessDir,filesep,FunSessionPrefixSet{iFunSession},AutoDataProcessParameter.StartingDirName],
        ...
 
Error in DPARSFA>pushbuttonRun_Callback (line 1674)
    [Error]=DPARSFA_run(handles.Cfg);
 
Error in gui_mainfcn (line 96)
        feval(varargin{:});
 
Error in DPARSFA (line 30)
    gui_mainfcn(gui_State, varargin{:});
 
Error while evaluating uicontrol Callback
 
 
 
Thank you very much again.
Best,
Hsiang-Yuan

YAN Chao-Gan

Wed, 09/30/2015 - 06:00

Hi Hsiang-Yuan,

I think this could be a problem of java update. Please see http://www.mathworks.com/matlabcentral/answers/65093-os-x-java-update-causes-matlab-parallel-computing-toolbox-to-break if it can solve the problem.

Best,

Chao-Gan

 

Hi Chao-Gan

Thank you very very much for your patience and kind help. Following your instruction, I think that I worked out the problem of java update and parallel computing toolbox (the error message regarding parallel functioning did not show). However, I still came across another error message as following,

 

Computing CWAS with:    "/Users/hsiangyuanlin/Documents/ADHD_Sib/FunImgARWSFC"
Reading images from "/Users/hsiangyuanlin/Documents/ADHD_Sib/FunImgARWSFC/ConS_6307/CovRegressed_4DVolume_4mm.nii" etc.
Error using y_CWAS (line 60)
Not enough input arguments.

Error in DPARSFA_run (line 3990)
        [p_Brain, F_Brain, Header] =
        y_CWAS([AutoDataProcessParameter.DataProcessDir,filesep,FunSessionPrefixSet{iFunSession},AutoDataProcessParameter.StartingDirName],
        ...

Error in DPARSFA>pushbuttonRun_Callback (line 1674)
    [Error]=DPARSFA_run(handles.Cfg);

Error in gui_mainfcn (line 96)
        feval(varargin{:});

Error in DPARSFA (line 30)
    gui_mainfcn(gui_State, varargin{:});
 
Error while evaluating uicontrol Callback

I wonder whether the problem might originate from covariates.txt. My covariates.txt looks like the attached figure, the first column is group, followed by sex, age, full IQ, mean FD.

 

Sorry to bother you again, however, I am very eager to apply CWAS in DPARSF for my study.

Thank you very very much again!

Best,

Hsiang-Yuan

Hi Chao-Gan,

I guessed the error as shown in the last message may arise from that I put the covariate.tx file in the wrong folder (I put it in the dropbox). After I moved the covariate file to the working folder (the same one where I put all the preprocessed folders), a new error message showed:

 


Computing CWAS with:    "/Users/hsiangyuanlin/Documents/ADHD_Sib/FunImgARWSFC"
Reading images from "/Users/hsiangyuanlin/Documents/ADHD_Sib/FunImgARWSFC/ConS_6307/CovRegressed_4DVolume_4mm.nii" etc.
Error using fileparts (line 34)
Input must be a row vector of characters.

Error in y_Read (line 40)
[pathstr, name, ext] = fileparts(FileName);

Error in y_ReadRPI (line 41)
[Data,Header] = y_Read(FileName,VolumeIndex);

Error in y_CWAS (line 50)
    [MaskData,MaskVox,MaskHead]=y_ReadRPI(AMaskFilename);

Error in DPARSFA_run (line 3990)
        [p_Brain, F_Brain, Header] =
        y_CWAS([AutoDataProcessParameter.DataProcessDir,filesep,FunSessionPrefixSet{iFunSession},AutoDataProcessParameter.StartingDirName],
        ...

Error in DPARSFA>pushbuttonRun_Callback (line 1674)
    [Error]=DPARSFA_run(handles.Cfg);

Error in gui_mainfcn (line 96)
        feval(varargin{:});

Error in DPARSFA (line 30)
    gui_mainfcn(gui_State, varargin{:});
 
Error while evaluating uicontrol Callback 

 

Thank you very very very much for your kind help. 

 

Best,

Hsiang-Yuan

louislin28

Mon, 10/05/2015 - 07:32

Hi Chao-Gan,

 

Thank you for reminding me of this important issue. I used group-specific whole brain mask, but found that I did not resample it to voxel size of isotorpic 4mm. After I resliced the mask, CWAS finally worked, and it still in calculation process. Hope I could get the final results. Thank you very very much for your kind help.

 

Best,

Hsiang-Yuan