dcm2bids goes crazy if `--participant` contains - or _
SamGuay opened this issue · 0 comments
SamGuay commented
I think we should add a safety check before app.run()
since atm a properly named directory will exist in tmp_dcm2bids/ (eg tmp_dcm2bids/sub-will_break
but as per BIDS specs it the participant label should only be made of alphanumeric values.
label - An alphanumeric value, possibly prefixed with arbitrary number of 0s for consistent indentation, [...]. Note that labels MUST not collide when casing is ignored (see Case collision intolerance)..
In addition, dcm2bids doesn't handle it properly as shown below
dcm2bids -c dcm2bids_config_source.json -p will_break -d sourcedata/CD004 --auto_extract
_entities
INFO:dcm2bids.dcm2bids_gen:--- dcm2bids start ---
INFO:dcm2bids.dcm2bids_gen:OS:version: Linux-5.15.0-73-generic-x86_64-with-glibc2.31
INFO:dcm2bids.dcm2bids_gen:python:version: 3.11.3 (main, Apr 19 2023, 23:54:32) [GCC 11.2.0]
INFO:dcm2bids.dcm2bids_gen:dcm2bids:version: 3.0.dev
INFO:dcm2bids.dcm2bids_gen:dcm2niix:version: v1.0.20230411
INFO:dcm2bids.dcm2bids_gen:participant: sub-will_break
[...]
WARNING:dcm2bids.acquisition:There was more than one suffix found (['break', 'epi']). This is not BIDS compliant. Make sure you know what you are doing.
WARNING:dcm2bids.acquisition:✅ Filename was reordered according to BIDS entity table order:
from: sub-will_break_dir-PA_epi
to: sub-will_dir-PA_break_epi