"""
EnsemblPheno_get_by_variant

Get phenotype associations for a specific variant (by rsID) from the Ensembl REST API. Returns tr...
"""

from typing import Any, Optional, Callable
from ._shared_client import get_shared_client


def EnsemblPheno_get_by_variant(
    variant_id: str,
    species: Optional[str] = "homo_sapiens",
    *,
    stream_callback: Optional[Callable[[str], None]] = None,
    use_cache: bool = False,
    validate: bool = True,
) -> Any:
    """
    Get phenotype associations for a specific variant (by rsID) from the Ensembl REST API. Returns tr...

    Parameters
    ----------
    species : str
        Species name. Use 'homo_sapiens' for human. Default: 'homo_sapiens'.
    variant_id : str
        Variant rsID. Examples: 'rs429358' (APOE e4), 'rs7903146' (TCF7L2 diabetes), ...
    stream_callback : Callable, optional
        Callback for streaming output
    use_cache : bool, default False
        Enable caching
    validate : bool, default True
        Validate parameters

    Returns
    -------
    Any
    """
    # Handle mutable defaults to avoid B006 linting error

    return get_shared_client().run_one_function(
        {
            "name": "EnsemblPheno_get_by_variant",
            "arguments": {"species": species, "variant_id": variant_id},
        },
        stream_callback=stream_callback,
        use_cache=use_cache,
        validate=validate,
    )


__all__ = ["EnsemblPheno_get_by_variant"]
