Skip to content

Commit

Permalink
updated nipype converter specs
Browse files Browse the repository at this point in the history
  • Loading branch information
tclose committed Feb 6, 2024
1 parent d9e3a4f commit 0796bb1
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
4 changes: 2 additions & 2 deletions nipype-auto-conv/generate
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ from importlib import import_module
import yaml
import nipype
import nipype2pydra.utils
from nipype2pydra.task import TaskConverter
from nipype2pydra.task import get_converter


SPECS_DIR = Path(__file__).parent / "specs"
Expand Down Expand Up @@ -49,7 +49,7 @@ for fspath in sorted(SPECS_DIR.glob("**/*.yaml")):

module_name = nipype2pydra.utils.to_snake_case(spec["task_name"])

converter = TaskConverter(
converter = get_converter(
output_module=f"pydra.tasks.{PKG_NAME}.auto.{module_name}",
callables_module=callables, # type: ignore
**spec,
Expand Down
6 changes: 3 additions & 3 deletions nipype-auto-conv/specs/eddy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ inputs:
# type=file|default=<undefined>: File containing indices for all volumes in --imain into --acqp and --topup
in_acqp: generic/file
# type=file|default=<undefined>: File containing acquisition parameters
in_bvec: generic/file
in_bvec: medimage/bvec
# type=file|default=<undefined>: File containing the b-vectors for all volumes in --imain
in_bval: generic/file
in_bval: medimage/bval
# type=file|default=<undefined>: File containing the b-values for all volumes in --imain
session: generic/file
# type=file|default=<undefined>: File containing session indices for all volumes in --imain
Expand All @@ -82,7 +82,7 @@ inputs:
# type=file|default=<undefined>: Matrix specifying the relative positions of the fieldmap, --field, and the first volume of the input file, --imain
slice_order: text/text-file
# type=file|default='': Name of text file completely specifying slice/group acquisition
json: generic/file
json: application/json
# type=file|default='': Name of .json text file with information about slice timing
metadata:
# dict[str, dict[str, any]] - additional metadata to set on any of the input fields (e.g. out_file: position: 1)
Expand Down
4 changes: 2 additions & 2 deletions nipype-auto-conv/specs/eddy_quad.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ inputs:
# type=file|default=<undefined>: File containing acquisition parameters
mask_file: generic/file
# type=file|default=<undefined>: Binary mask file
bval_file: generic/file
bval_file: medimage/bval
# type=file|default=<undefined>: b-values file
bvec_file: generic/file
bvec_file: medimage/bvec
# type=file|default=<undefined>: b-vectors file - only used when <base_name>.eddy_residuals file is present
field: generic/file
# type=file|default=<undefined>: TOPUP estimated field (in Hz)
Expand Down
2 changes: 1 addition & 1 deletion nipype-auto-conv/specs/smm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ outputs:
# from the nipype interface, but you may want to be more specific, particularly
# for file types, where specifying the format also specifies the file that will be
# passed to the field in the automatically generated unittests.
_p_map: generic/file
null_p_map: generic/file
activation_p_map: generic/file
# type=file:
deactivation_p_map: generic/file
Expand Down
12 changes: 12 additions & 0 deletions nipype-auto-conv/specs/topup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,19 @@ inputs:
out_logfile: generic/file
# type=file: name of log-file
# type=file|default=<undefined>: name of log-file
warp_res: typing.List[float]
subsamp: typing.List[int]
fwhm: typing.List[float]
reg_lambda: typing.List[float]
regmod: str
estmov: typing.List[int]
minmet: typing.List[int]
splineorder: int
interp: str
scale: bool
metadata:
scale:
argstr: "--scale {int(scale)}"
# dict[str, dict[str, any]] - additional metadata to set on any of the input fields (e.g. out_file: position: 1)
outputs:
omit:
Expand Down

0 comments on commit 0796bb1

Please sign in to comment.