| """ |
| Constants for CodeAct agent. |
| """ |
|
|
| import os |
|
|
| |
| LIBRARY_CONTENT_DICT = { |
| "numpy": "[Python Package] The fundamental package for scientific computing with Python, providing support for arrays, matrices, and mathematical functions.", |
| "scipy": "[Python Package] A Python library for scientific and technical computing, including modules for optimization, linear algebra, integration, and statistics.", |
| } |
|
|
|
|
| def _load_system_prompt() -> str: |
| """Load the system prompt template from prompts.yaml at the project root.""" |
| import yaml |
|
|
| |
| |
| here = os.path.dirname(os.path.abspath(__file__)) |
| for levels in (1, 2): |
| candidate = os.path.normpath(os.path.join(here, *[".."] * levels, "prompts.yaml")) |
| if os.path.exists(candidate): |
| with open(candidate, encoding="utf-8") as f: |
| data = yaml.safe_load(f) |
| return data["system_prompt"] |
| raise FileNotFoundError("prompts.yaml not found relative to core/constants.py") |
|
|
|
|
| SYSTEM_PROMPT_TEMPLATE = _load_system_prompt() |
|
|
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| _DISCLAIMER_TAIL = ( |
| "ULM p-values are liberal and scale " |
| "with regulon size, so rank results by effect size rather than by how small " |
| "padj is. PROGENy: 14-pathway model. Regulons: CollecTRI. These outputs " |
| "require independent validation before any biological or clinical conclusion." |
| ) |
|
|
| _DISCLAIMER_HEAD = "**Method limitations (decoupleR).** All TF and pathway values are *inferred* " |
|
|
| |
| |
| |
| |
| |
| |
| DECOUPLER_DISCLAIMER = ( |
| _DISCLAIMER_HEAD + "regulon/gene-set activities β not direct measurements of " |
| "protein activity, nuclear localization, or pathway flux. " + _DISCLAIMER_TAIL |
| ) |
|
|
| |
| |
| |
| DECOUPLER_DISCLAIMER_DE = ( |
| _DISCLAIMER_HEAD + "regulon/gene-set activities derived from " |
| "differential-expression statistics via the ULM model β not direct measurements " |
| "of protein activity, nuclear localization, or pathway flux. " + _DISCLAIMER_TAIL |
| ) |
|
|
| |
| |
| |
| DECOUPLER_DISCLAIMER_PER_SAMPLE = ( |
| _DISCLAIMER_HEAD + "regulon/gene-set activities scored directly from the " |
| "normalised expression matrix (no differential-expression step) β not direct " |
| "measurements of protein activity, nuclear localization, or pathway flux. " |
| "Per-sample scores are relative to the rest of the scored cohort, so they are " |
| "comparable across samples within this run but not across runs or datasets. " + _DISCLAIMER_TAIL |
| ) |
|
|