Skip to content

Commit b2b720a

Browse files
committed
manually fixed nipype2pydra converter issue where formatters are assigned as strings
1 parent 66c0020 commit b2b720a

File tree

17 files changed

+22
-22
lines changed

17 files changed

+22
-22
lines changed

pydra/tasks/afni/v25/model/deconvolve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ class Deconvolve(shell.Task["Deconvolve.Outputs"]):
312312
gltsym: list[str] = shell.arg(
313313
help="general linear tests (i.e., contrasts) using symbolic conventions (e.g., '+Label1 -Label2')",
314314
position=-2,
315-
formatter="gltsym_formatter",
315+
formatter=gltsym_formatter,
316316
)
317317
glt_label: list[ty.Any] = shell.arg(
318318
help="general linear test (i.e., contrast) labels",

pydra/tasks/afni/v25/preprocess/qwarp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ class Qwarp(shell.Task["Qwarp.Outputs"]):
294294
allineate_opts: str = shell.arg(
295295
help="add extra options to the 3dAllineate command to be run by 3dQwarp.",
296296
requires=["allineate"],
297-
formatter="allineate_opts_formatter",
297+
formatter=allineate_opts_formatter,
298298
)
299299
nowarp: bool = shell.arg(help="Do not save the _WARP file.", argstr="-nowarp")
300300
iwarp: bool = shell.arg(

pydra/tasks/afni/v25/preprocess/qwarp_plus_minus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class QwarpPlusMinus(shell.Task["QwarpPlusMinus.Outputs"]):
237237
allineate_opts: str = shell.arg(
238238
help="add extra options to the 3dAllineate command to be run by 3dQwarp.",
239239
requires=["allineate"],
240-
formatter="allineate_opts_formatter",
240+
formatter=allineate_opts_formatter,
241241
)
242242
nowarp: bool = shell.arg(help="Do not save the _WARP file.", argstr="-nowarp")
243243
iwarp: bool = shell.arg(

pydra/tasks/afni/v25/preprocess/retroicor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Retroicor(shell.Task["Retroicor.Outputs"]):
5353

5454
executable = "3dretroicor"
5555
in_file: Nifti1 = shell.arg(
56-
help="input file to 3dretroicor", position=-1, formatter="in_file_formatter"
56+
help="input file to 3dretroicor", position=-1, formatter=in_file_formatter
5757
)
5858
card: File = shell.arg(
5959
help="1D cardiac data file for cardiac correction",

pydra/tasks/afni/v25/preprocess/roi_stats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class ROIStats(shell.Task["ROIStats.Outputs"]):
102102
)
103103
stat: MultiInputObj = shell.arg(
104104
help="Statistics to compute. Options include:\n\n * mean = Compute the mean using only non_zero voxels.\n Implies the opposite for the mean computed\n by default.\n * median = Compute the median of nonzero voxels\n * mode = Compute the mode of nonzero voxels.\n (integral valued sets only)\n * minmax = Compute the min/max of nonzero voxels\n * sum = Compute the sum using only nonzero voxels.\n * voxels = Compute the number of nonzero voxels\n * sigma = Compute the standard deviation of nonzero\n voxels\n\nStatistics that include zero-valued voxels:\n\n * zerominmax = Compute the min/max of all voxels.\n * zerosigma = Compute the standard deviation of all\n voxels.\n * zeromedian = Compute the median of all voxels.\n * zeromode = Compute the mode of all voxels.\n * summary = Only output a summary line with the grand\n mean across all briks in the input dataset.\n This option cannot be used with nomeanout.\n\nMore that one option can be specified.",
105-
formatter="stat_formatter",
105+
formatter=stat_formatter,
106106
)
107107

108108
class Outputs(shell.Outputs):

pydra/tasks/afni/v25/preprocess/t_corr_map.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ class TCorrMap(shell.Task["TCorrMap.Outputs"]):
216216
help="", argstr="-Sexpr {sum_expr[0]} {sum_expr[1]}"
217217
)
218218
histogram_bin_numbers: int = shell.arg(help="")
219-
histogram: Path = shell.arg(help="", formatter="histogram_formatter")
219+
histogram: Path = shell.arg(help="", formatter=histogram_formatter)
220220
num_threads: int = shell.arg(help="set number of threads", default=1)
221221
outputtype: ty.Any = shell.arg(help="AFNI output filetype")
222222
out_file: Path = shell.arg(

pydra/tasks/afni/v25/preprocess/t_shift.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ class TShift(shell.Task["TShift.Outputs"]):
140140
)
141141
tpattern: ty.Any | None = shell.arg(
142142
help="use specified slice time pattern rather than one in header",
143-
formatter="tpattern_formatter",
143+
formatter=tpattern_formatter,
144144
)
145145
slice_timing: ty.Any | None = shell.arg(
146146
help="time offsets from the volume acquisition onset for each slice",
147-
formatter="slice_timing_formatter",
147+
formatter=slice_timing_formatter,
148148
)
149149
slice_encoding_direction: ty.Any = shell.arg(
150150
help="Direction in which slice_timing is specified (default: k). If negative,slice_timing is defined in reverse order, that is, the first entry corresponds to the slice with the largest index, and the final entry corresponds to slice index zero. Only in effect when slice_timing is passed as list, not when it is passed as file.",

pydra/tasks/afni/v25/preprocess/volreg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class Volreg(shell.Task["Volreg.Outputs"]):
6363
)
6464
in_weight_volume: ty.Any = shell.arg(
6565
help="weights for each voxel specified by a file with an optional volume number (defaults to 0)",
66-
formatter="in_weight_volume_formatter",
66+
formatter=in_weight_volume_formatter,
6767
)
6868
basefile: Nifti1 = shell.arg(
6969
help="base file for registration", argstr="-base {basefile}", position=-6

pydra/tasks/afni/v25/utils/bucket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Bucket(shell.Task["Bucket.Outputs"]):
4343
in_file: list[ty.Any] = shell.arg(
4444
help="List of tuples of input datasets and subbrick selection strings\nas described in more detail in the following afni help string\nInput dataset specified using one of these forms:\n``prefix+view``, ``prefix+view.HEAD``, or ``prefix+view.BRIK``.\nYou can also add a sub-brick selection list after the end of the\ndataset name. This allows only a subset of the sub-bricks to be\nincluded into the output (by default, all of the input dataset\nis copied into the output). A sub-brick selection list looks like\none of the following forms::\n\n fred+orig[5] ==> use only sub-brick #5\n fred+orig[5,9,17] ==> use #5, #9, and #17\n fred+orig[5..8] or [5-8] ==> use #5, #6, #7, and #8\n fred+orig[5..13(2)] or [5-13(2)] ==> use #5, #7, #9, #11, and #13\n\nSub-brick indexes start at 0. You can use the character '$'\nto indicate the last sub-brick in a dataset; for example, you\ncan select every third sub-brick by using the selection list\n``fred+orig[0..$(3)]``\nN.B.: The sub-bricks are output in the order specified, which may\nnot be the order in the original datasets. For example, using\n``fred+orig[0..$(2),1..$(2)]``\nwill cause the sub-bricks in fred+orig to be output into the\nnew dataset in an interleaved fashion. Using ``fred+orig[$..0]``\nwill reverse the order of the sub-bricks in the output.\nN.B.: Bucket datasets have multiple sub-bricks, but do NOT have\na time dimension. You can input sub-bricks from a 3D+time dataset\ninto a bucket dataset. You can use the '3dinfo' program to see\nhow many sub-bricks a 3D+time or a bucket dataset contains.\nN.B.: In non-bucket functional datasets (like the 'fico' datasets\noutput by FIM, or the 'fitt' datasets output by 3dttest), sub-brick\n``[0]`` is the 'intensity' and sub-brick [1] is the statistical parameter\nused as a threshold. Thus, to create a bucket dataset using the\nintensity from dataset A and the threshold from dataset B, and\ncalling the output dataset C, you would type::\n\n 3dbucket -prefix C -fbuc 'A+orig[0]' -fbuc 'B+orig[1]\n\n",
4545
position=-1,
46-
formatter="in_file_formatter",
46+
formatter=in_file_formatter,
4747
)
4848
num_threads: int = shell.arg(help="set number of threads", default=1)
4949
outputtype: ty.Any = shell.arg(help="AFNI output filetype")

pydra/tasks/afni/v25/utils/calc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Calc(shell.Task["Calc.Outputs"]):
6666

6767
executable = "3dcalc"
6868
in_file_a: Nifti1 = shell.arg(
69-
help="input file to 3dcalc", formatter="in_file_a_formatter", position=1
69+
help="input file to 3dcalc", formatter=in_file_a_formatter, position=1
7070
)
7171
in_file_b: File = shell.arg(
7272
help="operand file to 3dcalc", argstr="-b {in_file_b}", position=2

0 commit comments

Comments
 (0)