You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are learning to use BrainSpace toolbox for gradient analysis on 1 subject. We did the minimal preprocessing (no smoothing, no temporal filtering, no confound regression) in fmriprep (with FreeSurfer’s recon-all) as suggested. We tried to run the Tutorial 0’s code, we are getting errors in “import the dataset as timeseries”, “confound regression” steps.
Our computing environment is Ubuntu 22.04.4 LTS, Python 3.12.2.
We tried the following code:
import nibabel as nib
import numpy as np
filename = 'filename.{}.mgz' # where {} will be replaced with 'lh' and 'rh'
timeseries = [None] * 2
for i, h in enumerate(['lh', 'rh']):
timeseries[i] = nib.load(filename.format(h)).get_fdata().squeeze()
timeseries = np.vstack(timeseries)
We do not have an functional fmriprep output with .mgz extension, and any lh.mgz rh.mgz files. So, since our file is here:
import nibabel as nib
import numpy as np
filename = '~/Desktop/deneme/mdd/bids/derivatives/sub-02/func/sub-02_task-rest_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.nii.gz' # where {} will be replaced with 'lh' and 'rh'
timeseries = [None] * 2
for i, h in enumerate(['lh', 'rh']):
timeseries[i] = nib.load(filename.format(h)).get_fdata().squeeze()
timeseries = np.vstack(timeseries)
Then we ran:
from brainspace.datasets import fetch_timeseries_preprocessing
timeseries = fetch_timeseries_preprocessing()
from nilearn.interfaces.fmriprep import load_confounds_strategy
confounds_out = load_confounds_strategy("~/Desktop/deneme/mdd/bids/derivatives/sub-02/func/sub-02_task-rest_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.nii.gz", denoise_strategy='simple')
We got this error:
ValueError: Could not find associated confound file. The functional derivatives should exist under the same parent directory.
We did not understand this error because our confounds file (sub-02_task-rest_desc-confounds_timeseries.tsv) is in the same directory: “~/Desktop/deneme/mdd/bids/derivatives/sub-02/func”.
Then we saw a different code in your plot_tutorial0.py file to extract the confound columns, so we ran:
Hello,
We are learning to use BrainSpace toolbox for gradient analysis on 1 subject. We did the minimal preprocessing (no smoothing, no temporal filtering, no confound regression) in fmriprep (with FreeSurfer’s recon-all) as suggested. We tried to run the Tutorial 0’s code, we are getting errors in “import the dataset as timeseries”, “confound regression” steps.
Our computing environment is Ubuntu 22.04.4 LTS, Python 3.12.2.
We tried the following code:
We do not have an functional fmriprep output with .mgz extension, and any lh.mgz rh.mgz files. So, since our file is here:
~/Desktop/deneme/mdd/bids/derivatives/sub-02/func/sub-02_task-rest_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.nii.gz
We ran the code by writing our output path:
Then we ran:
We got this error:
ValueError: Could not find associated confound file. The functional derivatives should exist under the same parent directory.
We did not understand this error because our confounds file (sub-02_task-rest_desc-confounds_timeseries.tsv) is in the same directory: “~/Desktop/deneme/mdd/bids/derivatives/sub-02/func”.
Then we saw a different code in your plot_tutorial0.py file to extract the confound columns, so we ran:
We got this error:
TypeError: 'module' object is not callable.
We are not able to move forward to other tutorials due to these errors, can you please help us figure out these issues?
Thanks in advance, any help is appreciated.
Best,
Ozgum
The text was updated successfully, but these errors were encountered: