help > Error when importing fmriprep output to CONN toolbox
Jun 10, 2021  03:06 PM | Meishan AI
Error when importing fmriprep output to CONN toolbox
I have fmriprep output for a single subject:

/anat/
./anat:
sub-06_desc-aparcaseg_dseg.nii.gz
sub-06_desc-aseg_dseg.nii.gz
sub-06_desc-brain_mask.json
sub-06_desc-brain_mask.nii.gz
sub-06_desc-preproc_T1w.json
sub-06_desc-preproc_T1w.nii.gz
sub-06_dseg.nii.gz
sub-06_from-fsnative_to-T1w_mode-image_xfm.txt
sub-06_from-MNI152NLin2009cAsym_to-T1w_mode-image_xfm.h5
sub-06_from-T1w_to-fsnative_mode-image_xfm.txt
sub-06_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5
sub-06_hemi-L_inflated.surf.gii
sub-06_hemi-L_midthickness.surf.gii
sub-06_hemi-L_pial.surf.gii
sub-06_hemi-L_smoothwm.surf.gii
sub-06_hemi-R_inflated.surf.gii
sub-06_hemi-R_midthickness.surf.gii
sub-06_hemi-R_pial.surf.gii
sub-06_hemi-R_smoothwm.surf.gii
sub-06_label-CSF_probseg.nii.gz
sub-06_label-GM_probseg.nii.gz
sub-06_label-WM_probseg.nii.gz
sub-06_space-MNI152NLin2009cAsym_desc-brain_mask.json
sub-06_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz
sub-06_space-MNI152NLin2009cAsym_desc-preproc_T1w.json
sub-06_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz
sub-06_space-MNI152NLin2009cAsym_dseg.nii.gz
sub-06_space-MNI152NLin2009cAsym_label-CSF_probseg.nii.gz
sub-06_space-MNI152NLin2009cAsym_label-GM_probseg.nii.gz
sub-06_space-MNI152NLin2009cAsym_label-WM_probseg.nii.gz

ses-pre/
func/
sub-06_ses-pre_task-rest_desc-confounds_regressors.json
sub-06_ses-pre_task-rest_desc-confounds_regressors.tsv
sub-06_ses-pre_task-rest_space-fsaverage5_hemi-L.func.gii
sub-06_ses-pre_task-rest_space-fsaverage5_hemi-R.func.gii
sub-06_ses-pre_task-rest_space-fsnative_hemi-L.func.gii
sub-06_ses-pre_task-rest_space-fsnative_hemi-R.func.gii
sub-06_ses-pre_task-rest_space-MNI152NLin2009cAsym_res-2_boldref.nii.gz
sub-06_ses-pre_task-rest_space-MNI152NLin2009cAsym_res-2_desc-aparcaseg_dseg.nii.gz
sub-06_ses-pre_task-rest_space-MNI152NLin2009cAsym_res-2_desc-aseg_dseg.nii.gz
sub-06_ses-pre_task-rest_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.json
sub-06_ses-pre_task-rest_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.nii.gz
sub-06_ses-pre_task-rest_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.json
sub-06_ses-pre_task-rest_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.nii
sub-06_ses-pre_task-rest_space-T1w_boldref.nii.gz
sub-06_ses-pre_task-rest_space-T1w_desc-aparcaseg_dseg.nii.gz
sub-06_ses-pre_task-rest_space-T1w_desc-aseg_dseg.nii.gz
sub-06_ses-pre_task-rest_space-T1w_desc-brain_mask.json
sub-06_ses-pre_task-rest_space-T1w_desc-brain_mask.nii.gz
sub-06_ses-pre_task-rest_space-T1w_desc-preproc_bold.json
sub-06_ses-pre_task-rest_space-T1w_desc-preproc_bold.nii.gz


When I was trying to import this output into CONN, it gave me this error:

unzipping gz files...Importing data... please wait
unzipping gz files...ERROR DESCRIPTION:

Undefined function 'gunzip' for input arguments of type 'cell'.
Error in conn_gz2nii (line 17)
filename(redo)=gunzip(filename(redo));
Error in conn_getinfo (line 13)
filename=conn_gz2nii(filename);
Error in conn_file (line 11)
[nV,str,icon,filename]=conn_getinfo(filename,doconvert);
Error in conn_set_functional (line 8)
[CONN_x.Setup.functional{nsub}{nses},nV]=conn_file(out);
Error in conn_importvol2bids (line 294)
nV=conn_set_functional(nsub(end),nses(end),nset,out); % note: when nsubs = [nsubs1 nsubs2] or nses = [nses1 nses2] file_bids(nsub1,nses1) is assigned to nsub2,nses2 (in order to allow subject- and session- independent data)
Error in conn_importbids (line 59)
[nill,nill,nV]=conn_importvol2bids(filename{n2},nsub,nses,'func',[],[],[],[],[],true);
Error in conn (line 5895)
if bids_dofunc, [ok,err]=conn_importbids(info.dataset_select.func.data.file,'type','functional','subjects',nsubs,'subjects_id',bids_subj_id,'nset',nset,'localcopy',localcopy,'copytoderiv',copytoderiv); ERR=[ERR err]; end
CONN20.c
SPM12 + DAiSS DEM FieldMap MEEGtools suit
Matlab v.2020b
project: CONN20.c
storage: 22388.4Gb available
spm @ /home/ai.me/spm12
conn @ /work/cbhlab/software/conn

It seems that there are something wrong with the unzipping...I unzipped the files manually but it still gave me the same error. Does anyone have insignt on this issue? Thanks so much!

Threaded View

TitleAuthorDate
Error when importing fmriprep output to CONN toolbox
Meishan AI Jun 10, 2021
Alfonso Nieto-Castanon Jun 11, 2021
Meishan AI Jun 30, 2021
Meishan AI Jun 13, 2021