File size: 1,590 Bytes
bfe6079 | 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 32 33 34 35 36 37 38 | """
Reusable analysis workflow modules for the DecoupleRpy agent.
Architecture
------------
Workflows implement dataset-agnostic analysis steps that compose cleanly
for any dataset whose manifest declares them applicable.
Separation of concerns
~~~~~~~~~~~~~~~~~~~~~~~
- Dataset-specific knowledge (GEO URL, condition column, expected sample
counts, contrast definition) lives in src/datasets/manifests/*.yaml.
- Reusable logic (how to validate a condition column, how to extract
collapse parameters, how to rank activity scores) lives here.
- MCP tool wiring lives in src/tools/dataset_tools.py.
This means adding a new PDAC dataset requires only a new YAML manifest.
No workflow module needs editing unless the dataset introduces a genuinely
new analysis type (e.g. ATAC-seq, spatial) not covered by existing modules.
Modules
-------
metadata_validation Validate AnnData.obs against a dataset manifest.
microarray Microarray-specific preprocessing helpers (probe collapse).
activity_scoring TF and pathway activity scoring via decoupleR methods.
activity_stats Statistical analysis of activity scores (DE, ranking).
survival Survival analysis utilities (placeholder).
Usage from MCP tools
--------------------
from src.workflows.microarray import get_collapse_params, recommend_analysis_path
from src.workflows.activity_stats import get_contrast_groups
These functions read from parsed manifest dicts and return plain Python
values — they have no side effects and require no external dependencies
beyond the standard library.
"""
|