Skip to content

Commit 4f78e74

Browse files
tsaloeffigies
authored andcommitted
Remove non-alphanumeric characters from fmapid.
1 parent 2456489 commit 4f78e74

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sdcflows/workflows/outputs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
# https://www.nipreps.org/community/licensing/
2222
#
2323
"""Writing out outputs."""
24+
import re
25+
2426
from nipype.pipeline import engine as pe
2527
from nipype.interfaces import utility as niu
2628
from niworkflows.interfaces.bids import DerivativesDataSink as _DDS
@@ -156,7 +158,7 @@ def init_fmap_derivatives_wf(
156158
"""
157159
custom_entities = custom_entities or {}
158160
if bids_fmap_id:
159-
custom_entities["fmapid"] = bids_fmap_id.replace("_", "")
161+
custom_entities["fmapid"] = re.sub(r'[^a-zA-Z0-9]', '', bids_fmap_id)
160162

161163
workflow = pe.Workflow(name=name)
162164
inputnode = pe.Node(

0 commit comments

Comments
 (0)