Hi, all
I am trying to perform activation analysis on task fMRI. But there was a problem encountered during the join_fidl and join_fidl_folder stages. In my data, one participant had two traits of task fMRI, namely bold3 in the AP direction and bold4 in the PA direction. Each trail participant is required to perform three actions (each action needs to be performed twice), which means that each trail contains six random actions.
I want to know if using join_fidl_folder is correct in this situation. I saved .conc file in the concs folder and two .fidl files in the fidls folder.
Below is my .conc and .fidl files.
STG005.conc:
number_of_files: 2
file:/mnt/ssd2/qzheng/STG_all/qunex/STG_all/sessions/STG005/images/functional/bold3_Atlas.dtseries.nii
file:/mnt/ssd2/qzheng/STG_all/qunex/STG_all/sessions/STG005/images/functional/bold4_Atlas.dtseries.nii
STG005_bold3.fidl
0.8 encoding delay
28.0 1 28
84.0 2 28
140.0 0 28
196.0 1 28
252.0 0 28
308.0 2 28
STG005_bold4.fidl
0.8 encoding delay
28.0 2 28
84.0 0 28
140.0 1 28
196.0 2 28
252.0 0 28
308.0 1 28
my code:
join_fidl_folder)
qunex_container join_fidl_folder\
--concfolder="/mnt/ssd2/qzheng/STG_all/qunex/STG_all/sessions/inbox/concs" \
--fidlfolder="/mnt/ssd2/qzheng/STG_all/qunex/STG_all/sessions/inbox/fidls" \
--bind="${SDIR}:${SDIR}" \
--container="${QUNEX_CONTAINER}";
;;
Now I’m not sure whether organizing files and folders like this is correct. And after running, an error was reported.
--- Full QuNex call for command: join_fidl_folder
qunex join_fidl_folder --concfolder="/mnt/ssd2/qzheng/STG_all/qunex/STG_all/sessions/inbox/concs" --fidlfolder="/mnt/ssd2/qzheng/STG_all/qunex/STG_all/sessions/inbox/fidls"
---------------------------------------------------------
started running join_fidl_folder at 2025-08-22 11:59:20, track progress in /mnt/ssd2/qzheng/STG_all/qunex/comlogs/tmp_join_fidl_folder_2025-08-22_11.59.20.967435.log
call: gmri join_fidl_folder concfolder="/mnt/ssd2/qzheng/STG_all/qunex/STG_all/sessions/inbox/concs" fidlfolder="/mnt/ssd2/qzheng/STG_all/qunex/STG_all/sessions/inbox/fidls"
-----------------------------------------
---> reading STG005.conc
... 2 bolds: 005
ERROR
Traceback (most recent call last):
File "/opt/qunex/python/qx_utilities/general/core.py", line 735, in runWithLog
result = function(**args)
^^^^^^^^^^^^^^^^
File "/opt/qunex/python/qx_utilities/general/fidl.py", line 249, in join_fidl_folder
join_fidl(concfile, root, outfolder, fidlname)
File "/opt/qunex/python/qx_utilities/general/fidl.py", line 149, in join_fidl
bolddata = readConc(concfile, TR)
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/qunex/python/qx_utilities/general/fidl.py", line 94, in readConc
length = boldInfo(boldfile).frames * TR
^^^^^^^^^^^^^^^^^^
File "/opt/qunex/python/qx_utilities/general/fidl.py", line 50, in boldInfo
hdr = gi.niftihdr(boldfile)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/qunex/python/qx_utilities/general/img.py", line 387, in __init__
self.readHeader(filename)
File "/opt/qunex/python/qx_utilities/general/img.py", line 571, in readHeader
self.unpackHdr(h)
File "/opt/qunex/python/qx_utilities/general/img.py", line 472, in unpackHdr
e, = struct.unpack(">i", s.read(si)) # int - must be 348
^^^^^^^^^^
File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc7 in position 56: invalid continuation byte
-----------------------------------------
Finished at 2025-08-22 11:59:20
singularity exec --bind /home/qzheng,/mnt/ssd2/qzheng/STG_all:/mnt/ssd2/qzheng/STG_all --cleanenv /mnt/ssd2/qzheng/STG_all/qunex/qunexcontainer/qunex_suite-1.3.0.sif bash /home/qzheng/qunex/qunex_container_command_2025-08-22_11.59.17.288060.sh
I have tried using iconv -f US-ASCII -t UTF-8 STG005.conc > STG005_utf8.conc to convert .conc and .fidl files. But the format printed using file -i STG005_utf8.conc is still ‘us-ascii’. If I use printf ‘\xEF\xBB\xBF’ | cat - STG005.fidl > STG005_utf8.fidl to force the file to be converted to UTF-8 format, I will report this error ValueError: could not convert string to float: '\ufeff0.8. So how should I solve the above problems.
Thanks a lot!
Best, Kelly

