# This file was auto generated by Styx.
# Do not edit this file directly.

import typing
import pathlib
from styxdefs import *
import dataclasses

V_1DTRANSPOSE_METADATA = Metadata(
    id="fc94a17e9915d6fe592d2778f8c12462cf246455.boutiques",
    name="1dtranspose",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class V1dtransposeOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v_1dtranspose(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    outfile: OutputPathType | None
    """Transposed output file"""


def v_1dtranspose(
    infile: InputPathType,
    outfile: str | None = None,
    runner: Runner | None = None,
) -> V1dtransposeOutputs:
    """
    Transpose an AFNI *.1D file (ASCII list of numbers arranged in columns).
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/1dtranspose.html
    
    Args:
        infile: Input file (e.g. data.1D).
        outfile: Output file (e.g. transposed_data.1D), or '-' to write to\
            stdout.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V1dtransposeOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_1DTRANSPOSE_METADATA)
    cargs = []
    cargs.append("1dtranspose")
    cargs.append(execution.input_file(infile))
    if outfile is not None:
        cargs.append(outfile)
    ret = V1dtransposeOutputs(
        root=execution.output_file("."),
        outfile=execution.output_file(outfile) if (outfile is not None) else None,
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V1dtransposeOutputs",
    "V_1DTRANSPOSE_METADATA",
    "v_1dtranspose",
]
