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

import typing
import pathlib
from styxdefs import *
import dataclasses

FAT_MAT_TABLEIZE_PY_METADATA = Metadata(
    id="087a0494cbbc551153bb18291702595477bae363.boutiques",
    name="fat_mat_tableize.py",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class FatMatTableizePyOutputs(typing.NamedTuple):
    """
    Output object returned when calling `fat_mat_tableize_py(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_table: OutputPathType
    """Table file usable in AFNI group analysis programs."""
    output_log: OutputPathType
    """Log file reporting inputs, matching, and aspects of creating the table
    file."""


def fat_mat_tableize_py(
    runner: Runner | None = None,
) -> FatMatTableizePyOutputs:
    """
    Make tables for AFNI group analysis programs from 3dNetCorr (*.netcc) and
    3dTrackID (*.grid) outputs, with optional additional subject information from
    CSV files.
    
    Author: AFNI Team
    
    URL:
    https://afni.nimh.nih.gov/pub/dist/doc/program_help/fat_mat_tableize.py.html
    
    Args:
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `FatMatTableizePyOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(FAT_MAT_TABLEIZE_PY_METADATA)
    cargs = []
    cargs.append("fat_mat_tableize.py")
    cargs.append("[-in_mat")
    cargs.append("INPUT_MATRICES]")
    cargs.append("[-in_csv")
    cargs.append("INPUT_CSV]")
    cargs.append("[-in_listfile")
    cargs.append("INPUT_LIST]")
    cargs.append("[-prefix")
    cargs.append("OUTPUT_PREFIX]")
    cargs.append("[-pars")
    cargs.append("PARAMETERS]")
    cargs.append("[-ver]")
    cargs.append("[-date]")
    cargs.append("[-help]")
    cargs.append("[-h]")
    cargs.append("[-hview]")
    ret = FatMatTableizePyOutputs(
        root=execution.output_file("."),
        output_table=execution.output_file("[OUTPUT_PREFIX]_tbl.txt"),
        output_log=execution.output_file("[OUTPUT_PREFIX]_prep.log"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "FAT_MAT_TABLEIZE_PY_METADATA",
    "FatMatTableizePyOutputs",
    "fat_mat_tableize_py",
]
