-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
accounting for confounds in timeseries #15
Comments
Thanks to point this out. This is a mistake on the website. We finally did not account for the confounds but instead provided the motions which can be corrected with |
Actually this is the notebook which is faulty. I am correcting this now. |
Ok thanks. The thing is that I plotted many correlation matrices and they have relatively high anticorrelations, but from the script it looks as if only detrending has been achieved, so I am a little puzzled. Can you confirm that the images from which the signal is extracted have not undergone any time processing step ? |
Hey @salma1601, anticorrelations are still present in resting state data, even without confound regression. The question is, how much anticorrelation are you seeing? I wish I can play with the data myself, but I'm currently swamped with other stuff to do. :( |
@salma1601 The only processing that have been done is spatial smoothing and detrending: here |
@salma1601 For your "other" sample of rsfMRI data, how are you obtaining your time series? Using the same cortical parcellation scheme? |
I used the same function to extract detrended timeseries from the same atlas. Before that, my images have undergone standard spatial preprocessing steps, leading to normalized images in MNI. Note that I use the "other" subsample Just for illustration. I had the opportunity in the past to work on différent rsfMRI datasets and I never experienced such correlation patterns before confounds regression, this is why I am puzzled. |
@salma1601 yes, I agree that the distribution of correlations in this dataset looks a lot like something you would see after removing the global or white-matter signal. It's definitely puzzling. I did some digging and the detrend method is as expected (removes mean and linear trend). |
@glemaitre you mention that you provided the motions which can be corrected with nilearn.signal.clean. |
This should be something like: import numpy as np
import pandas as pd
from nilearn.signal import clean
path_motions_subject = './fmri/motions/subject_id/run_*/motions.txt'
confounds = np.loadtxt(path_motions)
path_fmri = './some_atlas/subject_id/run_*/subject_id_task-Rest_confounds.csv'
timeseries = pd.read_csv(path_fmri, header=None)
cleaned_timeseries = clean(timeseries, confounds=confounds) |
Ok thanks |
It is said in the doc that "For each subject, we preliminary extracted signals using different brain parcellations and atlases and accounting for motion correction and confounds." but while going through the script
preprocessing/extract_time_series.py it looks like the saved .csv files are obtained without confounds regression
https://github.com/ramp-kits/autism/blob/master/preprocessing/extract_time_series.py#L233
Am I misunderstanding something ?
The text was updated successfully, but these errors were encountered: