If I want to import data for just a number of subjects, what’s the correct way to do that? The following command ended up importing data for all the subjects located in the inbox folder, not just S00076 and S00099:
qunex import_bids
–sessions=‘S00076,S00099’
–inbox=‘/home/bids’
–sessionsfolder='/home/hcp/sessions
In the log file for import_bids:
call: gmri import_bids sessions=“S00076,S00099” inbox=“/home/bids” sessionsfolder=“/home/hcp/sessions”
The subject folders in /home/bids are named like “sub-S00076” and each just has one session, so within the subject folders there is just an anat and func folder.
Hi,
Did you try typing the full subject name in the sessions
field? So:
--sessions="sub-S00076,sub-S00099"
Let me know how it goes.
Best, Jure
Thanks for the reply. Unfortunately that didn’t work, but I did try something else that worked: I copied the subject folders to the ${STUDY_FOLDER}/sessions/inbox/BIDS folder, along with the BIDS related files that are necessary (participants.tsv/json, README, dataset_description.json). If I then point to that folder instead of the original folder, import_bids works as expected, only importing the specified subjects.
In my original bids folder there are additional folders such as “sourcedata”, “code”, and “derivatives”. I wonder if one of the files in the code and/or derivatives folder in particular is causing the issue. There is a large file in derivatives, “freesurfer.tar.gz”. When I import the data from my original BIDS folder, Qunex tries to “process” that file. Also in the code folder there are files (not data) named like “sub-NCANDA_S00430…”, which the import_bids function seems to be finding and trying to import as data (?). This is the beginning of the log file:
# Generated by QuNex 1.1.1 [QIO] on 2025-03-28_09.14.04.204896
#
call: gmri import_bids inbox="/home/bids" sessionsfolder="${STUDY_FOLDER}/sessions" sessions="sub-S00430,sub-S00450"
-----------------------------------------
Running import_bids
==================
---> identifying files in /home/bids
---> Inbox type: bids_study
---> Paths:
bidsinfo -> ${STUDY_FOLDER}/info/bids
bidsinbox -> ${STUDY_FOLDER}/sessions/inbox/BIDS
bidsarchive ->${STUDY_FOLDER}/sessions/archive/BIDS
---> mapping files to QuNex bids folders
---> skipping processing of BIDS info folder
---> incomplete bids for session NCANDA already exists: cleaning session
---> processing tar package [/home/bids/derivatives/freesurfer.tar.gz]
---> incomplete bids for session S00848 already exists: cleaning session
---> incomplete bids for session S00051 already exists: cleaning session
Hi,
I am glad that you managed to resolve your issue. Sorry I was not much help here.
Yes, the BIDS import is quite strict when it comes to the folder structure. It expect full BIDS compliance. It could be that there are some issues with how we interpreted the BIDS specification and there are some scenarios that should work but currently do not. Let us investigate what happened in your case and try to improve the import_bids
functionality.
Thanks for reporting this!
Best, Jure
1 Like
@delrubin Hi, I can’t reproduce the issue on another BIDS folder. Session selection works fine for me, and I don’t have any particular problems with derivatives and code folders. Can you please run the command
find <path_to_folder> -type f > files.txt
and upload the files.txt
here so that I can reproduce your folder structure?
We have resolved this issue, the patch will be released in the next QuNex (if all goes to plan by the end of this month).
Best, Jure
1 Like