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

import typing
import pathlib
from styxdefs import *
import dataclasses

FAT_MVM_PREP_PY_METADATA = Metadata(
    id="3815f6c885d1532f06123e9f01ad665a3388567f.boutiques",
    name="fat_mvm_prep.py",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class FatMvmPrepPyOutputs(typing.NamedTuple):
    """
    Output object returned when calling `fat_mvm_prep_py(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    mvmtbl: OutputPathType
    """Output tabular text file for 3dMVM."""
    mvmprep_log: OutputPathType
    """Log file detailing subject matching and ROI list."""


def fat_mvm_prep_py(
    prefix: str,
    csv_file: InputPathType,
    runner: Runner | None = None,
) -> FatMvmPrepPyOutputs:
    """
    Combine FATCAT output with CSV data for statistical modeling.
    
    Author: AFNI Team
    
    URL:
    https://afni.nimh.nih.gov/pub/dist/doc/program_help/fat_mvm_prep.py.html
    
    Args:
        prefix: Prefix for output files.
        csv_file: Comma-separated variable (CSV) file for input.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `FatMvmPrepPyOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(FAT_MVM_PREP_PY_METADATA)
    cargs = []
    cargs.append("fat_mvm_prep.py")
    cargs.append("-p")
    cargs.extend([
        "-p",
        prefix
    ])
    cargs.append("-c")
    cargs.extend([
        "-c",
        execution.input_file(csv_file)
    ])
    cargs.append("[MATRIX_OPTION]")
    ret = FatMvmPrepPyOutputs(
        root=execution.output_file("."),
        mvmtbl=execution.output_file(prefix + "_MVMtbl.txt"),
        mvmprep_log=execution.output_file(prefix + "_MVMprep.log"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "FAT_MVM_PREP_PY_METADATA",
    "FatMvmPrepPyOutputs",
    "fat_mvm_prep_py",
]
