help > RE: Automatic fMRIPrep Import to CONN not working
10 hours ago | Alfonso Nieto-Castanon - Boston University
RE: Automatic fMRIPrep Import to CONN not working

Dear Ricarda,


Sorry for the late reply, this was a bit harder to debug. It seems the issue was with the tpl-<label> and cohort-<label> parts of the filenames, which are newer additions to the BIDS convention (before this, template information was typically included as part of the space-<label> naming) and were not supported by CONN's implementation. I am attaching a patch to fix this, which should allow you to import your fMRIPrep output files without a problem (this patch is for release 25b, to use it simply copy the attached file to your CONN distribution folder overwriting the file with the same name there). Let me know if you still run into any issues.


Hope this helps


Alfonso


Originally posted by ricardaj:



Dear Alfonso, 


 


thank you so much for your response. I attached the temporalfile.mat file and am looking forward to your suggestions. Thanks again! 


 


Best


Ricarda 


 


 


Originally posted by Alfonso Nieto-Castanon:



Dear Ricarda,


Could you please type in your Matlab command's line the following:


  info = conn_bidsdir('...\derivatives\fmriprep');


  save temporalfile.mat info;


(changing the ...\derivatives\fmreprep bit to the actual location of your fmriprep folder) and then send me that temporalfile.mat file so I can take a look at the contents of your folder structure and see if that helps me figure out why CONN is not importing any files?


Best 


Alfonso


Originally posted by ricardaj:



Dear CONN community,


I am currently trying to use the automatic import function in:


Project → New (import) → From fMRIPrep dataset


However, the importer does not create any subjects.
When I select my fMRIPrep root folder, CONN shows something like:



“1 folder selected, XXXX matching files”



but after clicking OK, nothing happens and no data are imported. No error message appears.


 


Folder structure


My fMRIPrep output is located in:

...\derivatives\
      fmriprep\
          dataset_description.json
          sub-01\
              anat\
              func\
              figures\
              log\
          sub-02\
              anat\
              func\
              figures\
              log\
          ...
          sub-15\


The folder name is exactly fmriprep, and dataset_description.json is directly inside this folder (not inside subject folders).



Filename structure


Originally, subjects were named like sub-VP105, so I renamed them to numeric BIDS-style names:

sub-01_task-RS1_space-MNIPediatricAsym_cohort-6_desc-preproc_bold.nii.gz
sub-01_task-RS2_space-MNIPediatricAsym_cohort-6_desc-preproc_bold.nii.gz


I am using the NIH Pediatric MNI template (MNIPediatricAsym) from fMRIPrep.


Manual loading of functional and structural files into CONN works without issues.
Only the automatic fMRIPrep importer does not detect any subjects.



I would like to use the automatic importer for a larger dataset (≈90 participants), so understanding why my current dataset is not detected would be very helpful.


Thank you very much!
Ricarda






 



 



 

Attachment: conn_bidsdir.m

Threaded View

TitleAuthorDate
ricardaj Nov 21, 2025
Alfonso Nieto-Castanon Dec 16, 2025
ricardaj Dec 17, 2025
RE: Automatic fMRIPrep Import to CONN not working
Alfonso Nieto-Castanon 10 hours ago
Jerry Ritter Dec 10, 2025