Dear Serena,

You may want to check a header of your residual_aggr file.

I also tried to regress out the effect of WM and CSF using the fsl_glm command (similar to yours). When I then used the resulting residual file in the stats analysis, I received an error "input file has a TR of 1: If the data was generated with an older MRI sequence, this may be incorrect and need to be fixed in the header".  I checked a header of the residual file and found that the original TR=1.5 was changed  to TR=1sec for some reason.

I don't know why the header became broken during running the fsl_glm command, but coping the header from the denoised epi file to the residual file fixed the problem.
I used the following command:
fslcpgeom denoised_func_data_aggr.nii.gz residual.nii.gz

Thank you,
Anna.




On Fri, Dec 11, 2015 at 1:59 PM, sere f <[log in to unmask]> wrote:
Dear FSL experts,
I am doing RS analysis and I apply ICA-AROMA for movement correction.

I use FEAT to preprocessing data:
I turn on : motion correction, slice timing correction, BET, spatial smoothimg.

I run FAST  to segment T1 in WM and CSF and I register WM and CSF  from T1 to epi

After applying ICA-AROMA 

fslmeants -i $1/RS/RS_ICA-AROMA.feat/aromaout/denoised_func_data_aggr.nii.gz -m $1/T1/CSFepi.nii.gz -o $1/T1/CSFepi_aggr.txt

fslmeants -i $1/RS/RS_ICA-AROMA.feat/aromaout/denoised_func_data_aggr.nii.gz -m $1/T1/WMepi.nii.gz -o $1/T1/WMepi_aggr.txt

paste $1/T1/CSFepi_aggr.txt $1/T1/WMepi_aggr.txt > $1/T1/confounds_aggr.txt


fsl_glm -i $1/RS/RS_ICA-AROMA.feat/aromaout/denoised_func_data_aggr.nii.gz -d $1/T1/confounds_aggr.txt -o $1/RS/RS_ICA-AROMA.feat/aromaout/beta_aggr --demean --out_res=$1/RS/RS_ICA-AROMA.feat/aromaout/residual_aggr

fslmaths $1/RS/RS_ICA-AROMA.feat/aromaout/residual_aggr -Tmean $1/RS/RS_ICA-AROMA.feat/aromaout/tempMean_aggr

fslmaths $1/RS/RS_ICA-AROMA.feat/aromaout/residual_aggr -bptf 20 -1 -add $1/RS/RS_ICA-AROMA.feat/aromaout/tempMean_aggr $1/RS/RS_ICA-AROMA.feat/aromaout/residualFiltMean_aggr


I feed concat-MELODIC with residualFiltMean_aggr of all subjects in order to perform Dual Regression, but MELODIC crashes in Preprocessing Stage 2 of all subjects because mask is empty:

/usr/local/fsl/bin/fslmaths example_func -mul 0 -add 1 mask -odt char
/usr/local/fsl/bin/fslstats prefilterd_func_data -p 90

0.00000
divide by zero

Cold anyone give me advice?

Thanks

Serena