ADNI-to-BIDS

76 views
Skip to first unread message

Shahzad ALi

unread,
Oct 30, 2024, 7:58:46 AM10/30/24
to clinic...@googlegroups.com
Dear Alice,
I hope you are doing well.
I am having error while converting T1, FDG and AV45 PET scans in  clinica from adni-to-bids:

ValueError: For subject 109_S_1343 in session ses-M000, an error occurred whilst recentering Nifti image: /Volumes/CrucialX6/SS_ADNI/Clinica/ADNI_T1_FDG_AV45/ADNI/109_S_1343/FDG_Brain_Em_-_Iter_Brain_Mode_/2007-04-24_07_26_33.0/I78559/ADNI_109_S_1343_PET_FDG_Brain_Em_-_Iter_Brain_Mode__br_raw_20071026071616697_S41947_I78559.vThe error is: Cannot work out file type of "/Volumes/CrucialX6/SS_ADNI/Clinica/ADNI_T1_FDG_AV45/ADNI/109_S_1343/FDG_Brain_Em_-_Iter_Brain_Mode_/2007-04-24_07_26_33.0/I78559/ADNI_109_S_1343_PET_FDG_Brain_Em_-_Iter_Brain_Mode__br_raw_20071026071616697_S41947_I78559.v"


Please guide me in resolving this error.

Thanks & Best,

Shahzad Ali PhD Researcher

Alice Joubert

unread,
Oct 31, 2024, 4:53:03 AM10/31/24
to clinic...@googlegroups.com
Hello Ali,

I will try to reproduce. Can you remind me your setup (clinica and python version), as well as the command line you are using ?

Best,

Alice

--
You received this message because you are subscribed to the Google Groups "Clinica" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clinica-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/clinica-user/CAPaAoQSmd-2jR0Jr1_ytJycgc%3D_fLat%2BtVtw8v1_mPom1je_mw%40mail.gmail.com.

Shahzad ALi

unread,
Oct 31, 2024, 7:54:38 AM10/31/24
to clinic...@googlegroups.com

Dear Alice,
Thanks for your response. 
Here are the details about setup:

(clinicaEnv) shahzadali@Shahzads-MacBook-Pro ~ % conda --version

conda 24.5.0

(clinicaEnv) shahzadali@Shahzads-MacBook-Pro ~ % python --version

Python 3.10.13

(clinicaEnv) shahzadali@Shahzads-MacBook-Pro ~ % 


I am using the following command for conversion (converting T1, FDG and AV45 PET scans in  clinica from adni-to-bids:):

clinica convert adni-to-bids /Volumes/CrucialX6/SS_ADNI/Clinica/ADNI_T1_FDG_AV45/ADNI 

/Volumes/CrucialX6/SS_ADNI/Clinica/ADNI_ClinicalData 

/Volumes/CrucialX6/SS_ADNI/Clinica/ADNI_T1_FDG_AV45/BIDS_Converted


ValueError: For subject 109_S_1343 in session ses-M000, an error occurred whilst recentering Nifti image: /Volumes/CrucialX6/SS_ADNI/Clinica/ADNI_T1_FDG_AV45/ADNI/109_S_1343/FDG_Brain_Em_-_Iter_Brain_Mode_/2007-04-24_07_26_33.0/I78559/ADNI_109_S_1343_PET_FDG_Brain_Em_-_Iter_Brain_Mode__br_raw_20071026071616697_S41947_I78559.vThe error is: Cannot work out file type of "/Volumes/CrucialX6/SS_ADNI/Clinica/ADNI_T1_FDG_AV45/ADNI/109_S_1343/FDG_Brain_Em_-_Iter_Brain_Mode_/2007-04-24_07_26_33.0/I78559/ADNI_109_S_1343_PET_FDG_Brain_Em_-_Iter_Brain_Mode__br_raw_20071026071616697_S41947_I78559.v"



Furthermore, I tried to convert individual PET-FDG files using:

clinica convert adni-to-bids /Volumes/CrucialX6/SS_ADNI/Clinica/ADNI_All/PET_FDG /Volumes/CrucialX6/SS_ADNI/Clinica/ADNI_ClinicalData /Volumes/CrucialX6/SS_ADNI/Clinica/ADNI_All/BIDS_Converted/PET_FDG_Converted -m PET_FDG

ValueError: For subject 053_S_7086 in session ses-M000, an error occurred whilst recentering Nifti image: /Volumes/CrucialX6/SS_ADNI/Clinica/ADNI_All/PET_FDG/053_S_7086/ADNI_Brain_PET__Raw/2022-11-07_13_56_57.0/I1639968/ADNI_053_S_7086_PET_ADNI_Brain_PET__Raw_br_raw_20221108141318761_S1174102_I1639968.iThe error is: Cannot work out file type of "/Volumes/CrucialX6/SS_ADNI/Clinica/ADNI_All/PET_FDG/053_S_7086/ADNI_Brain_PET__Raw/2022-11-07_13_56_57.0/I1639968/ADNI_053_S_7086_PET_ADNI_Brain_PET__Raw_br_raw_20221108141318761_S1174102_I1639968.i"





Furthermore, at the end of normal other conversions like fMRI, PET_TAU, PET_AMYLOID, etc. The following warning appears, is this the normal execution?

:162: PerformanceWarning: indexing past lexsort depth may impact performance.

  dxsum_df.loc[(alternative_id, "sc"), "DIAGNOSIS"].values[0]

2024-10-31 12:46:46,079:INFO:Creating sessions files...

/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/clinica/iotools/converters/adni_to_bids/adni_utils.py:208: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`

  df_subj_sessions["a_stat"] = df_subj_sessions.apply(

/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/clinica/iotools/converters/adni_to_bids/adni_utils.py:216: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`

  df_subj_sessions["tau_stat"] = df_subj_sessions.apply(


I will be very thankful for your help in this matter.

Best,

Shahzad Ali PhD Researcher

-----------------------------------------------------------------------



Shahzad ALi

unread,
Oct 31, 2024, 7:59:19 AM10/31/24
to clinic...@googlegroups.com
apologies, The clinica version is:
clinica --version: clinica, version 0.9.1

% python --version:  Python 3.10.13

Alice Joubert

unread,
Nov 4, 2024, 11:39:17 AM11/4/24
to Clinica
Dear Ali,

Thanks for your answer. From the beginning when downloading the images for these two subjects the image format is invalid : extensions .v and .i are not managed by clinica at all. Clinica expects either nifti or dicom images. Do you know if that kind of format represents a lot of images in your dataset ? Personally, it is not a format I am familiar with.

Also, for the additional warnings appearing for session files creation it may not be optimal but clinica still outputs what is expected.

Best,

Alice

Reply all
Reply to author
Forward
0 new messages