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

import typing
import pathlib
from styxdefs import *
import dataclasses

RUN_QDEC_GLM_METADATA = Metadata(
    id="b83d7c50b5137b0f5530f2c1776edefd9de98fa2.boutiques",
    name="run-qdec-glm",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class RunQdecGlmOutputs(typing.NamedTuple):
    """
    Output object returned when calling `run_qdec_glm(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""


def run_qdec_glm(
    qdec_directory: str,
    runner: Runner | None = None,
) -> RunQdecGlmOutputs:
    """
    QDEC GLM (General Linear Model) execution tool for statistical analysis.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        qdec_directory: Directory containing QDEC data.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `RunQdecGlmOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(RUN_QDEC_GLM_METADATA)
    cargs = []
    cargs.extend([
        "-glm",
        "run-qdec" + qdec_directory
    ])
    ret = RunQdecGlmOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "RUN_QDEC_GLM_METADATA",
    "RunQdecGlmOutputs",
    "run_qdec_glm",
]
