We are trying to denoise fMRI data in Nilearn. The data were preprocessed using fMRIprep with --use-aroma
.
We have some doubts about the Standardize option in NiftiSpheresMasker. It seems to influence the final pattern of connectivity matrices strongly.
Also, after denoising procedure the mean value of the time series from each ROI is not equal zero.
Could you check if our denoising procedure is valid?
###--- import file
file = 'sub-01_ses-1_task-dualnback_bold_space-MNI152NLin2009cAsym_variant-smoothAROMAnonaggr_preproc.nii.gz'
confound='sub-01_ses-1_task-dualnback_bold_confounds.tsv'
### - PARCELLATION
###--- define Power atlas spheres
power = nilearn.datasets.fetch_coords_power_2011()
coords = np.vstack((power.rois['x'], power.rois['y'], power.rois['z'])).T
spheres_masker = nilearn.input_data.NiftiSpheresMasker(seeds=coords, radius=5., standardize=True)
# --- choose only the important regressors (CSF, White Matter, Linear Trend) and save new confounds file
conf=pd.read_csv(confound,delimiter='\t')
conf=conf[['CSF','WhiteMatter']]
conf['LinearTrend']=list(range(1,341))
np.savetxt(confound[:-4]+'_edited.csv',conf,delimiter=',')
###--- create time-series in all ROIs and apply filters
time_series_power = spheres_masker.fit_transform(file, confounds=confound[:-4]+'_edited.csv')
time_series_power_filtered=signal.clean(time_series_power,low_pass=0.08,high_pass=0.009)
###--- create the connectivity matrices
correlation_measure = ConnectivityMeasure(kind='correlation')
correlation_matrix = correlation_measure.fit_transform([time_series_power_filtered])[0]
Thanks for any feedback,
Miriam