Hi Jure,
My name is Joe, and I’m super new to QuNex. I’m currently working with GE data (BIDS format) where each subject has multiple scans, and the number of scans can vary (luckily, only one session). I’ve attempted to create a mapping.txt
file that can map all the different files using the same structure (for example, some subjects have different rs-fMRI scans, some have emotion-task fMRI, some haven’t).
My first question is: can the mapping file handle unequal numbers of files for each subject?
I ran the import_bids
command, and it generated numerical labels for each file:
Running map_bids2nii for subject CONN126, session BL
====================================================
---> linked 1.nii.gz <-- sub-CONN126_ses-BL_T1w.nii.gz
---> linked 2.nii.gz <-- sub-CONN126_ses-BL_T2w.nii.gz
---> linked 3.nii.gz <-- sub-CONN126_ses-BL_dir-pe0_run-00_epi.nii.gz
---> linked 4.nii.gz <-- sub-CONN126_ses-BL_dir-pe0_run-01_epi.nii.gz
The issue is that this approach doesn’t work well when there are unequal numbers of files for each subject. How can I specify the BIDS file names to ensure that the mapping remains valid, even when the number of scans differs? Currently, I’m trying to create a mapping.txt
file that includes all possible file names (union of all file name) as attach here.
mapping.txt (1.5 KB)
Thank you for your help!
Best regards,
Joe
Hi Joe!
Welcome to QuNex forums!
We often work with data where the number of scans inside sessions can be different in some cases, so QuNex should be able to help you out in this case.
What exactly is the problem if you try to use the mapping.txt
file you provided? Could you upload a few (2 or 3) session.txt
files and the resulting session_hcp.txt
files once the mapping is applied (create_session_info
command) on sessions that have a different number of scans and outline the issues in these files. I think we will be able to help you more efficiently, if we have this information as well.
Best, Jure
Thank you Jure,
There is an error at the create_session_info command:
Running create_session_info
===================
... Reading pipeline mapping from /scratch/setthanan/STACT/mapping.txt
---> ERROR in completing create_session_info:
Invalid mapping file.
Please check the specified file [/scratch/setthanan/STACT/mapping.txt].
Syntax error: invalid mapping rule
So, I can’t give you the session_hcp.txt, but here is my session.txt output while mapping.txt file was attached above.
session.txt (1.6 KB)
I’m using this qunex_suite-0.100.0.sif
QuNex container version.
Best regards, Joe
The first thing that pops up is the weird ~
character at the end of your mapping file.
I made some changes to the mapping file (mapping.txt (1.0 KB)). However, some additional changes might be needed to get it to work as I do not have the data so I cannot properly test it. If the data is open and not private/sensitive you can share it, one way for us to resolve this quickly would be that you upload a session or two somewhere, so I can actually test everything.
Best, Jure
Thanks, Jure. It’s work! I noticed that one of the major changes you made in the mapping.txt file was the removal of some scans, such as BOLD gonogo, conscious, and nonconscious. While some subjects have these scans, the one I showed you doesn’t. Could you share the reason for removing these scans from this particular subject?
Best regards,
Joe
I removed them for this subject because it did not have them. I could not properly set them up as I did not have the exact naming for them. You can now take a look at the pattern I used and add them back. Just add them to the file I sent and it should work.
Best, Jure
Thanks for the explanation and your help, Jure!
Best regards, Joe