All,
I followed this example to create a post-ICA-AROMA pipeline and am running into an issue--the TR of the resulting data is 1 (should be 0.71). It appears as though the TR is getting changed at the step where the residuals are being calculated (both residual.nii.gz and final_denoised_filtered_functional.nii.gz are TR=1).
Should I just modify the header of the outputs to correct the TR, or is this TR change indicative of an error in the processing?
Pipeline steps post-aroma are below for reference.
Best,
James
#to start, generate conservative wm and csf masks per the recommendations of Pruim et al 2015
#Threshold (robust range at 95%) subject space pve's
mkdir nuisance_masks
fslmaths $sbjdir/t1.anat/T1_fast_pve_2.nii.gz -thrp 95 $prepdir/nuisance_masks/wm_sbj_thrp95.nii.gz
fslmaths $sbjdir/t1.anat/T1_fast_pve_0.nii.gz -thrp 95 $prepdir/nuisance_masks/csf_sbj_thrp95.nii.gz
#Threshold (robust range at 95%) MNI standard tissuepriors
fslmaths $FSLDIR/data/standard/tissuepriors/avg152T1_csf.hdr -thrp 95 $prepdir/nuisance_masks/csf_MNIhdr_thrp95
fslmaths $FSLDIR/data/standard/tissuepriors/avg152T1_white.hdr -thrp 95 $prepdir/nuisance_masks/wm_MNIhdr_thrp95
#Register subject space thresholded masks to subject/native functional space
flirt -in $prepdir/nuisance_masks/csf_sbj_thrp95.nii.gz \
-applyxfm \
-init $prepdir/output.feat/reg/highres2example_func.mat \
-ref $prepdir/output.feat/reg/example_func.nii.gz \
-out $prepdir/nuisance_masks/csf_sbj_func_space
flirt -in $prepdir/nuisance_masks/wm_sbj_thrp95.nii.gz \
-applyxfm \
-init $prepdir/output.feat/reg/highres2example_func.mat \
-ref $prepdir/output.feat/reg/example_func.nii.gz \
-out $prepdir/nuisance_masks/wm_sbj_func_space
#Register MNI space thresholded masks to subject/native functional space
flirt -in $prepdir/nuisance_masks/csf_MNIhdr_thrp95.nii.gz \
-applyxfm \
-init $prepdir/output.feat/reg/standard2example_func.mat \
-ref $prepdir/output.feat/reg/example_func.nii.gz \
-out $prepdir/nuisance_masks/csf_MNIhdr_func_space
flirt -in $prepdir/nuisance_masks/wm_MNIhdr_thrp95.nii.gz \
-applyxfm \
-init $prepdir/output.feat/reg/standard2example_func.mat \
-ref $prepdir/output.feat/reg/example_func.nii.gz \
-out $prepdir/nuisance_masks/wm_MNIhdr_func_space
#Multiply each csf and wm mask by its counterpart (subject*MNI) to generate respective conservative mask
cd $prepdir/nuisance_masks
fslmaths csf_sbj_func_space.nii.gz -mul csf_MNIhdr_func_space.nii.gz csf_conservative
fslmaths wm_sbj_func_space.nii.gz -mul wm_MNIhdr_func_space.nii.gz wm_conservative
#Get mean of denoised functional data (to be added to the residuals below)
cd $prepdir
fslmaths output.feat/ICA_AROMA/denoised_func_data_nonaggr.nii.gz -Tmean tempMean
#Take mean of csf and wm timeseries and paste into design matrix (text file, so this is temporal regression within wm and csf)
fslmeants -i output.feat/ICA_AROMA/denoised_func_data_nonaggr.nii.gz \
-m $prepdir/nuisance_masks/wm_conservative.nii.gz \
--no_bin \
-o $prepdir/nuisance_masks/wm_in_func_bin_timeseries
fslmeants -i output.feat/ICA_AROMA/denoised_func_data_nonaggr.nii.gz \
-m $prepdir/nuisance_masks/csf_conservative.nii.gz \
--no_bin \
-o $prepdir/nuisance_masks/csf_in_func_bin_timeseries
cd $prepdir/nuisance_masks
paste wm_in_func_bin_timeseries csf_in_func_bin_timeseries > nuisance_timeseries
#Regress out wm and csf timeseries
cd $prepdir
fsl_glm -i output.feat/ICA_AROMA/denoised_func_data_nonaggr.nii.gz -d $prepdir/nuisance_masks/nuisance_timeseries --demean --out_res=residual
#apply highpass filter and add the tempMean back into data
fslmaths residual.nii.gz -bptf 70 0 -add tempMean.nii.gz final_denoised_filtered_functional
#data should be ready to pass to MELODIC for group ICA analysis
########################################################################
To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
|