Skip to content

Architecture and Data Flow

This page describes the project-level code areas that exist in this repository and how data flows through the KinOpt workflow.


Project Areas

Area Role
processing/ Cleans input data and maps optimization results to network-oriented tables
kinopt/local/ Runs constrained local kinase-phosphorylation optimization
kinopt/fitanalysis/ Provides post-fit analysis helpers
kinopt/optimality/ Provides KKT, feasibility, sensitivity, and reporting utilities
config/ Provides CLI parsing and logging helpers
config_loader.py Loads config.toml and mode-specific configuration overrides

Data Flow

flowchart TD
    A["Raw input CSV files"]

    subgraph prep ["processing/"]
        B["cleanup.py<br/>clean and transform input tables"]
        C["map.py<br/>map optimization outputs to network tables"]
    end

    subgraph opt ["kinopt/"]
        D["local/<br/>JAXopt-based constrained optimization"]
        F["fitanalysis/<br/>post-fit analysis helpers"]
        G["optimality/<br/>KKT and feasibility diagnostics"]
    end

    subgraph runtime ["runtime configuration"]
        H["config/<br/>CLI and logging"]
        I["config_loader.py<br/>config.toml loading"]
    end

    A --> B
    B --> D
    D --> F
    D --> G
    D --> C
    H --> D
    I --> D

Directory Summary

KinOpt/
├── config/
│   ├── __init__.py
│   ├── cli.py
│   └── logconf.py
├── config_loader.py
├── kinopt/
│   ├── __init__.py
│   ├── fitanalysis/
│   ├── local/
│   └── optimality/
├── processing/
│   ├── __init__.py
│   ├── cleanup.py
│   └── map.py
└── config.toml

Runtime Paths

The docs build and development tasks should run with the repository root on PYTHONPATH so local imports resolve to the checked-out code. The Pixi docs tasks set PYTHONPATH=. for this reason.