Closed oesteban closed 3 years ago
Okay, it seems to boil down to this line: https://github.com/nipreps/niworkflows/blob/32a33d61ab64e262a4ebcf8afcf232d70c2f92b3/niworkflows/interfaces/bids.py#L583
where build_path
is passed
{'subject': '36', 'suffix': 'fieldmap', 'datatype': 'figures', 'extension': 'svg', 'desc': 'pepolar', 'fmapid': 'auto00000'}
and patterns
contain those from our nipreps.json
config:
[
...
'sub-{subject}/{datatype<figures>}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}][_space-{space}][_cohort-{cohort}][_desc-{desc}]_{suffix<T1w|T2w|T1rho|T1map|T2map|T2star|FLAIR|FLASH|PDmap|PD|PDT2|inplaneT[12]|angio|dseg|mask|dwi|epiref|fieldmap|T2starw|MTw|TSE>}{extension<.html|.svg>|.svg}',
'sub-{subject}/{datatype<figures>}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}][_space-{space}][_cohort-{cohort}][_fmapid-{fmapid}][_desc-{desc}]_{suffix<fieldmap>}{extension<.html|.svg>|.svg}',
'sub-{subject}/{datatype<figures>}/sub-{subject}[_ses-{session}]_task-{task}[_acq-{acquisition}][_ce-{ceagent}][_dir-{direction}][_rec-{reconstruction}][_run-{run}][_echo-{echo}][_space-{space}][_cohort-{cohort}][_desc-{desc}]_{suffix<bold>}{extension<.html|.svg>|.svg}']
Here, build_path
returns 'sub-36/figures/sub-36_desc-pepolar_fieldmap.svg'
.
Is it possible that the extension
should have the initial dot? /cc @effigies @mgxd
Okay, found it - the fieldmap-specific pattern was being overshadowed by the immediately previous pattern.
DerivativesDataSink produces
derivatives/dmriprep/sub-36/figures/sub-36_desc-pepolar_fieldmap.svg
instead ofderivatives/dmriprep/sub-36/figures/sub-36_fmapid-auto0000_desc-pepolar_fieldmap.svg
It seems that
allowed_entities
is not respected in this case.