Skip to content

Commit

Permalink
Remove non-alphanumeric characters from fmapid.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo authored and effigies committed May 8, 2024
1 parent 2456489 commit 4f78e74
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdcflows/workflows/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
# https://www.nipreps.org/community/licensing/
#
"""Writing out outputs."""
import re

from nipype.pipeline import engine as pe
from nipype.interfaces import utility as niu
from niworkflows.interfaces.bids import DerivativesDataSink as _DDS
Expand Down Expand Up @@ -156,7 +158,7 @@ def init_fmap_derivatives_wf(
"""
custom_entities = custom_entities or {}
if bids_fmap_id:
custom_entities["fmapid"] = bids_fmap_id.replace("_", "")
custom_entities["fmapid"] = re.sub(r'[^a-zA-Z0-9]', '', bids_fmap_id)

workflow = pe.Workflow(name=name)
inputnode = pe.Node(
Expand Down

0 comments on commit 4f78e74

Please sign in to comment.