File size: 1,084 Bytes
081f1c7
3ed6b66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""The five knowledge endpoints (ADR-0001 §4). Names and parameter order are frozen by the descriptor.

Each is ``fn(*strings) -> payload dict``; ``ENDPOINTS`` maps the contract name to the function
and its parameter names, in the order ``gradio_ui`` exposes them and the descriptor records.
"""

from __future__ import annotations

from src.endpoints.annotate import annotate_genes
from src.endpoints.drugs import drugs_for_targets
from src.endpoints.pathways import pathways_for_genes
from src.endpoints.targets import targets_for_disease
from src.endpoints.trials import trials_for_genes

ENDPOINTS = {
    "drugs_for_targets": (drugs_for_targets, ("genes",)),
    "trials_for_genes": (trials_for_genes, ("genes", "condition", "status")),
    "annotate_genes": (annotate_genes, ("genes",)),
    "pathways_for_genes": (pathways_for_genes, ("genes",)),
    "targets_for_disease": (targets_for_disease, ("disease", "size")),
}

__all__ = [
    "ENDPOINTS",
    "annotate_genes",
    "drugs_for_targets",
    "pathways_for_genes",
    "targets_for_disease",
    "trials_for_genes",
]