For future reference when using the dual regression procedure:
If you receive the following error in the txt files created during drC (in "scripts + logs" folder), it is is due to a mismatch of the number of voxels in the xyz dimensions between the group maps produced from melodic (melodic_IC.nii.gz) and the individual subject preprocessed inputs (filtered_func_data.nii.gz) when using the dual regression script.
"
ERROR: GLM design does not match input image in size
Could not open matrix file Dual_reg/outputss/output1/dr_stage1_subject00000.txt
** ERROR (nifti_image_read): failed to find header file for 'Dual_reg/outputss/output1/dr_stage2_subject00000'
** ERROR: nifti_image_open(Dual_reg/outputss/output1/dr_stage2_subject00000): bad header info
Error: failed to open file Dual_reg/outputss/output1/dr_stage2_subject00000
Cannot open volume Dual_reg/outputss/output1/dr_stage2_subject00000 for reading!
"
The following explains why this error occurred in my analyses and how to correct the data formatting to move past the error so that the dual regression script can run to completion.
Initially, for my analysis using melodic to make group IC maps, I chose to have the group maps resampled to 2mm (registration tab in the GUI), resulting in the following fslinfo for the melodic_IC.nii.gz I used in the dual regression
fslinfo melodic_IC.nii.gz
datatype FLOAT 32
dim1 91
dim2 109
dim3 91
dim4 20
datatype 16
pixdim1 2.0
pixdim2 2.0
pixdim3 2.0
pixdim4 1.0
Given the following fslinfo for the individual subject preprocessed inputs for the dual regression ...
fslinfo IM02_filtered_func_data.nii.gz
datatype FLOAT 32
dim1 64
dim2 64
dim3 35
dim4 240
datatype 16
pixdim1 3.5
pixdim2 3.5
pixdim3 3.5
pixdim4 1.0
... the number of voxels in the group maps did not match the number of voxels in the individual level data, which resulted in the error message shown above due to the fact that the dual regression script, for each individual input, uses the group level spatial maps to make subject specific maps associated with the group level maps.
To correct this, FLIRT can be used to transform the individual level preprocessed data (filtered_func_data.nii.gz used in melodic to make the group level maps) into the dimensions of the 2mm standard used during registration in melodic by using the following file (from the registration of the individual level data during melodic): example_func2standard.mat
Using applyXFM in FLIRT utilities complete the following procedure for each input:
set the transformation matrix to the example_func2standard.mat found in the folder created for each input used in the melodic
(Temp_Concat/IM02_filtered_func_data_melodic.ica/reg/example_func2standard.mat)
set input to the respective preprocessed file you want to transform
(Temp_Concat/IM02_filtered_func_data.nii.gz)
set "reference" to the respective standard used in melodic registration
(MNI_152_T1_2mm_brain.nii.gz)
set output destination-filename for transformed individual preprocessed input
(Dual_reg/inputs/resamp/fr_IM02_filtered_func_data.nii.gz)
Using this procedure, initial IM02_filtered_func_data.nii.gz was transformed to have the following dimensions:
fslinfo fr_IM02_filtered_func_data.nii.gz
datatype FLOAT 32
dim1 91
dim2 109
dim3 91
dim4 240
datatype 16
pixdim1 2.0
pixdim2 2.0
pixdim3 2.0
pixdim4 1.0
This transformed individual-level preprocessed data was then compatible for use in the dual regression procedure with the 2mm melodic_IC group maps. Dual regression script then successfully created maps (nii.gz files) for each individual that were based on the group level maps from the 2mm melodic_IC.nii.gz file.
|