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

[FEATURE]: Capital letter in BIDS dataset for sessions #1154

Open
Fayed-Rsl opened this issue Feb 14, 2024 · 3 comments
Open

[FEATURE]: Capital letter in BIDS dataset for sessions #1154

Fayed-Rsl opened this issue Feb 14, 2024 · 3 comments
Labels

Comments

@Fayed-Rsl
Copy link

Fayed-Rsl commented Feb 14, 2024

I have a pretty standard BIDS dataset validated using bids validator that looks like that:
image

But unfortunately when I use leaddbs it does not found the anat for my subjects due to an error regarding the session naming.
Indeed, I noticed in the tutorial that there is only minor case for the session (highlighted in yellow)
image

Unfortunately, as we can see from my bids dataset, my session naming is in CamelCase (e.g., PreOp vs preop), so I guessed that was the reason why it didn't work. And it was in fact due to that. After renaming into minor case as in the tutorial everything worked fine.

This is why I think that having a feature that can recognise capital letter (e.g., PreOp considered as preop) could be a nice feature and I feel like it should not much be a lot complicated to implement. Otherwise, I would need to re-name my whole dataset to make leaddbs work.

Please let me know if this is possible to have such feature.
Thank you!
Fayed

@ningfei
Copy link
Collaborator

ningfei commented Feb 14, 2024

Thanks for the suggestion. Solved in 677eb38. Feel free to close the issue if it works for you.

@Fayed-Rsl
Copy link
Author

Thanks for the suggestion. Solved in 677eb38. Feel free to close the issue if it works for you.

Hi thank you for your quick reply.
I manage to make the update and I am currently using the leaddbs 3.1 version.
The fix you made is working well for parsing the filename including CamelCase, but for some reason I encountered an issue with the acquisition 'iso' combined with CamelCase.

For example, this is working correctly:
/BIDS/rawdata/sub-001/ses-PreOp/anat/sub-001_ses-PreOp_acq-ax_T1w.nii.gz

But this is not working and leads to the error --> Unrecognized field name 'acq'
/BIDS/rawdata/sub-001/ses-PreOp/anat/sub-001_ses-PreOp_acq-iso_T1w.nii.gz

Note that if I rename the file as this (without camel case) then I have no error.
/BIDS/rawdata/sub-001/ses-preop/anat/sub-001_ses-preop_acq-iso_T1w.nii.gz

Could you please have a look into it?
Thank you!

@Fayed-Rsl
Copy link
Author

Thanks for the suggestion. Solved in 677eb38. Feel free to close the issue if it works for you.

Note that the solution proposed here also doesn't work for post operation CT files. For example: PostOp_CT still does not work but postop_CT works fine, indicating a problem in the fetching.

Thank you for your help

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

No branches or pull requests

2 participants