Closed Wusat824 closed 1 week ago
I've tried to figure out what is the problem. According to the Clinica GitHub issues section Bug APGEN1, it is a bug due to the ADNI 4 update. The ADNI team changed the file structure with the latest dataset update, and the Clinica conversion tool needs to be updated accordingly.
I've tried to solve the issue by myself using the Clinica source code, but I have not yet found a solution.
I encountered an issue while attempting to convert the ADNI data to BIDS format using Clinica. The command I am running is:
"clinica convert adni-to-bids -m T1 DATASET_DIRECTORY CLINICAL_DATA_DIRECTORY BIDS_DIRECTORY" the error is 2024-09-14 11:09:50,281:INFO:No T1 image path found for subject 035_S_7121 in visit bl with image ID 1669252 2024-09-14 11:09:50,347:INFO:Paths of T1 images found. Exporting images into BIDS ... 2024-09-14 11:09:53,315:INFO:Creating modality agnostic files... 2024-09-14 11:09:53,324:INFO:Creating participants.tsv... Traceback (most recent call last): File "C:\Users\wusat\Desktop\AXIAL-main.venv\Lib\site-packages\pandas\core\indexes\base.py", line 3802, in get_loc return self._engine.get_loc(casted_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "pandas_libs\index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc File "pandas_libs\index.pyx", line 165, in pandas._libs.index.IndexEngine.get_loc File "pandas_libs\hashtable_class_helper.pxi", line 5745, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas_libs\hashtable_class_helper.pxi", line 5753, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: 'APGEN1'
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "C:\Users\wusat\Desktop\AXIAL-main.venv\Scripts\clinica.exe__main.py", line 7, in
File "C:\Users\wusat\Desktop\AXIAL-main.venv\Lib\site-packages\clinica\cmdline.py", line 92, in main
cli()
File "C:\Users\wusat\Desktop\AXIAL-main.venv\Lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\wusat\Desktop\AXIAL-main.venv\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\wusat\Desktop\AXIAL-main.venv\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\wusat\Desktop\AXIAL-main.venv\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\wusat\Desktop\AXIAL-main.venv\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\wusat\Desktop\AXIAL-main.venv\Lib\site-packages\click\core.py", line 783, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\wusat\Desktop\AXIAL-main.venv\Lib\site-packages\clinica\iotools\converters\adni_to_bids\adni_to_bids_cli.py", line 79, in cli
adni_to_bids.convert_clinical_data(
File "C:\Users\wusat\Desktop\AXIAL-main.venv\Lib\site-packages\clinica\iotools\converters\adni_to_bids\adni_to_bids.py", line 123, in convert_clinical_data
participants_df = bids.create_participants_df(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\wusat\Desktop\AXIAL-main.venv\Lib\site-packages\clinica\iotools\bids_utils.py", line 125, in create_participants_df
value_to_read = file_to_read[participant_fields_db[i]]