Error in CWAS analysis; how to input a regressor file (txt)

Submitted by jwhnavy on

Dear Dr. Yan,

Thank you for developing a wonderful toolbox to analyze resting-state fMRI data. I'd like to use CWAS implemented in DPARSFA for my project. However, when conducting CWAS with my data, I came across an error.  I've used resliced time-series data and mask images as the voxel size of isotropic 4 mm. I guess the error was caused by a regressor file I used. I plan to perform the CWAS analysis with IQ or age (i.e., continuous variable) like Shehzad et al. (2014)'s study

1) Could you show (or explain) me one example of regressor (covariate) files? Is the regressor file just one row matrix (i.e., 1 x n; n is the number of subjects)?

2) Is there any method to control the effects of age and gender on the result from CWAS when using CWAS function implemented in DPARSFA?

The following is the error message:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Computing CWAS with:    "/Users/jungwh/Documents/00_del/test_CWAS/FunImgARCWSF444"
Reading images from "/Users/jungwh/Documents/00_del/test_CWAS/FunImgARCWSF444/Reslice_DMP0010/Filtered_4DVolume_00001.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 4102)
        [p_Brain, F_Brain, Header] =
        y_CWAS([AutoDataProcessParameter.DataProcessDir,filesep,FunSessionPrefixSet{iFunSession},AutoDataProcessParameter.StartingDirName],
        ...

Error in DPARSFA>pushbuttonRun_Callback (line 1779)
    [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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 

best,

Wi Hoon

YAN Chao-Gan

Tue, 07/05/2016 - 03:37

Hi,

Seems it got a problem when loading the mask file. What did you set there?

jwhnavy

Thu, 07/14/2016 - 00:56

In reply to by YAN Chao-Gan

Hi  Chao-Gan,

I've just addressed this error after revising some codes  (in DPARSFA_run.m) below according to your eariler comment;

from 

        % CWAS Calculation
        [p_Brain, F_Brain, Header] = y_CWAS([AutoDataProcessParameter.DataProcessDir,filesep,FunSessionPrefixSet{iFunSession},AutoDataProcessParameter.StartingDirName], ...
            AutoDataProcessParameter.SubjectID, ...
            [AutoDataProcessParameter.DataProcessDir,filesep,FunSessionPrefixSet{iFunSession},'Results',filesep,'CWAS',filesep,'CWAS.nii'], ...
            AutoDataProcessParameter.CWAS.Regressors, ...
            AutoDataProcessParameter.CWAS.iter);
 
to 
        % CWAS Calculation
        [p_Brain, F_Brain, Header] = y_CWAS([AutoDataProcessParameter.DataProcessDir,filesep,FunSessionPrefixSet{iFunSession},AutoDataProcessParameter.StartingDirName], ...
            AutoDataProcessParameter.SubjectID, ...
            [AutoDataProcessParameter.DataProcessDir,filesep,FunSessionPrefixSet{iFunSession},'Results',filesep,'CWAS',filesep,'CWAS.nii'], ...
            AutoDataProcessParameter.MaskFileForEachSubject{i}, ...
            AutoDataProcessParameter.CWAS.Regressors, ...
            AutoDataProcessParameter.CWAS.iter,...
            0,...
            [],...
            0);

 

Thanks,

Wi Hoon