Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues when running AIBL converter #1374

Open
fyb99 opened this issue Nov 14, 2024 · 8 comments
Open

Issues when running AIBL converter #1374

fyb99 opened this issue Nov 14, 2024 · 8 comments

Comments

@fyb99
Copy link

fyb99 commented Nov 14, 2024

Description
Continuous errors with 'FileNotFoundError: No such file or no access: '/XXX/data/AIBL/AIBL_BIDS/sub-AIBL18/ses-M036/anat/sub-AIBL18_ses-M036_T1w.nii.gz''

Converters

  • aibl-to-bids

Hi, recently I am trying to use clinica for converting the raw data from ADNI to the BIDS format. When I use the clinica framework to convert the T1-mri with the command 'clinica convert aibl-to-bids ./AIBL ./clinical ./AIBL_BIDS', although it can succesfully convert some samples, it will continously meet error with '/XXX/data/AIBL/AIBL_BIDS/sub-AIBL18/ses-M036/anat/sub-AIBL18_ses-M036_T1w.nii.gz'. After checking this folder, it commonly only has a json file without the nii.gz file. How to fix it? My system is linux and the version of clinica is 0.9.2.

@NicolasGensollen
Copy link
Member

Hi @fyb99

Thanks for reporting. Could you provide the logs you get when running the convert command ?

@fyb99
Copy link
Author

fyb99 commented Nov 14, 2024

Hi, I just try to manually delete these folders in the raw data. It lead to another result (see the figure), which seems like an error. But I can find the tsv and json file in the final output dir. Does it mean I successully convert the data?
image
By the way, for the former question, the logs have been covered in my terminal window. But I am sure the error all reports 'FileNotFoundError: No such file or no access: '/XXX/data/AIBL/AIBL_BIDS/sub-AIBL18/ses-M036/anat/sub-AIBL18_ses-M036_T1w.nii.gz'' And the dirs that I mannually delete are 313,516 and another one (I forget this index, sorry)

@NicolasGensollen
Copy link
Member

The error in the screenshot seems like a bug to me indeed.

The variable file_path comes from

files_to_read = [f for f in clinical_data_dir.glob(file_name)]
if file_ext == ".xlsx":
file_to_read = pd.read_excel(files_to_read[0], sheet_name=sheet)
elif file_ext == ".csv":
file_path = files_to_read[0]

Such that it is a PosixPath and not a string. This line should probably be:

if "flutemeta" in file_path.name and study_name == StudyName.AIBL

instead.

@NicolasGensollen
Copy link
Member

For the initial error you were having, it is difficult to make a diagnostic without the logs because the FileNotFoundError seems more like a consequence of the real problem.
I suspect something went wrong when trying to convert those images, and no nifti images were produced, which leads to this error at some point. The logs should, in theory, contain information on these conversion errors.

@NicolasGensollen
Copy link
Member

I'm going to open a dedicated issue for the PosixPath vs. String bug and make a fix for it, leaving this one open for the initial issue you were facing.

@fyb99
Copy link
Author

fyb99 commented Nov 14, 2024

Thanks fory your reply. By the way, although the code reports the error about the file_path, I can find the participants.tsv and dataset_description.json file in the target dir, do you think the converting process has succeeded? Since I only need the T1 mri and clinical data of the corresponding patient, may I continue to the next step?

@NicolasGensollen
Copy link
Member

The conversion process failed at the very last step in which the scans TSV files are computed and written:

create_scans_tsv_file(
output_dataset, input_clinical_data, clinical_specifications_folder
)

In other words, the output you have should contain everything except these files which contain some metadata relative to the images.
If the conversion wasn't too long, I would advise to redo it once the bug is patched but I believe you should be fine continuing as I don't think these metadata are strictly mandatory to run the pipelines.

@fyb99
Copy link
Author

fyb99 commented Nov 14, 2024

ok, thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants