{"id":28497641,"url":"https://github.com/bibymaths/phoskintime","last_synced_at":"2026-02-28T09:32:13.555Z","repository":{"id":289566355,"uuid":"955375070","full_name":"bibymaths/phoskintime","owner":"bibymaths","description":"An optimization driven ODE-based modeling pipeline for analyzing cell-signaling dynamics over time.","archived":false,"fork":false,"pushed_at":"2026-01-21T12:20:34.000Z","size":38054,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-21T13:49:02.854Z","etag":null,"topics":["kinase-activity-predictions","kinase-modeling","mrna-degradation","network-analysis","ode-model","optimization","optimization-methods"],"latest_commit_sha":null,"homepage":"https://bibymaths.github.io/phoskintime/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bibymaths.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-26T14:40:42.000Z","updated_at":"2026-01-18T23:48:38.000Z","dependencies_parsed_at":"2025-04-23T23:39:30.480Z","dependency_job_id":"58960ef6-d4bd-45c9-b107-92b7337929c0","html_url":"https://github.com/bibymaths/phoskintime","commit_stats":null,"previous_names":["bibymaths/phoskintime"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bibymaths/phoskintime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bibymaths%2Fphoskintime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bibymaths%2Fphoskintime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bibymaths%2Fphoskintime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bibymaths%2Fphoskintime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bibymaths","download_url":"https://codeload.github.com/bibymaths/phoskintime/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bibymaths%2Fphoskintime/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29929350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"online","status_checked_at":"2026-02-28T02:00:07.010Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kinase-activity-predictions","kinase-modeling","mrna-degradation","network-analysis","ode-model","optimization","optimization-methods"],"created_at":"2025-06-08T13:06:30.417Z","updated_at":"2026-02-28T09:32:13.538Z","avatar_url":"https://github.com/bibymaths.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PhosKinTime\n \n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15351017.svg)](https://doi.org/10.5281/zenodo.15351017)\n\n**PhosKinTime** is an ODE-based modeling package for analyzing phosphorylation dynamics over time. It integrates\nparameter estimation, sensitivity analysis, steady-state computation, and visualization tools to help researchers\nexplore kinase-substrate interactions in a temporal context.\n\n## Acknowledgments\n\nThis project originated as part of my master's thesis work at Theoretical Biophysics group (\nnow, [Klipp-Linding Lab](https://rumo.biologie.hu-berlin.de/tbp/index.php/en/)), Humboldt Universität zu Berlin.\n\n- **Conceptual framework and mathematical modeling** were developed under the supervision of **[Prof. Dr. Dr. H.C. Edda Klipp](https://rumo.biologie.hu-berlin.de/tbp/index.php/en/people/51-people/head/52-klipp)**.\n- **Experimental datasets** were provided by the **[(Retd. Prof.) Dr. Rune Linding](https://rumo.biologie.hu-berlin.de/tbp/index.php/en/people/51-people/head/278-rune-linding)**.\n- The subpackage `tfopt` is an optimized and efficient derivative\n  of [original work](https://github.com/Normann-BPh/Transcription-Optimization) by my colleague **[Julius Normann](https://github.com/Normann-BPh)**, adapted with permission.\n\nI am especially grateful\nto [Ivo Maintz](https://rumo.biologie.hu-berlin.de/tbp/index.php/en/people/54-people/6-staff/60-maintz) for his generous\ntechnical support, enabling seamless experimentation with packages and server setups.\n\n## Overview\n\nPhosKinTime uses ordinary differential equations (ODEs) to model phosphorylation kinetics and supports multiple\nmechanistic hypotheses, including:\n\n- **Distributive Model:** Phosphorylation events occur independently.\n- **Successive Model:** Phosphorylation events occur sequentially.\n- **Random Model:** Phosphorylation events occur in a random manner.\n\nThe package is designed with modularity in mind. It consists of several key components:\n\n- **Configuration:** Centralized settings (paths, parameter bounds, logging, etc.) are defined in the config module.\n- **Models:** Different ODE models (distributive, successive, random) are implemented to simulate phosphorylation.\n- **Parameter Estimation:** Multiple routines (sequential and normal estimation) estimate kinetic parameters from\n  experimental data.\n- **Sensitivity Analysis:** Morris sensitivity analysis is used to evaluate the influence of each parameter on the model\n  output.\n- **Steady-State Calculation:** Functions compute steady-state initial conditions for ODE simulation.\n- **Utilities:** Helper functions support file handling, data formatting, report generation, and more.\n- **Visualization:** A comprehensive plotting module generates static and interactive plots to visualize model fits,\n  parameter profiles, PCA, t-SNE, and sensitivity indices.\n\n## Installation\n\nThis guide provides clean setup instructions for running the `phoskintime` package on a new machine. Choose the scenario\nthat best fits your environment and preferences. \n \nBefore proceeding, ensure you have the following prerequisites installed: \n \n- graphviz (for generating diagrams)   \n\n```bash \n# For Debian/Ubuntu\nsudo apt-get install graphviz   \n\n# For Fedora\nsudo dnf install graphviz    \n\n# For MacOS\nbrew install graphviz \n``` \n\n- python 3.10 or higher \n\n```bash  \n# Check python version \npython3 --version  \n\n# If not installed, install python 3.10 or higher \n\n# For Debian/Ubuntu  \nsudo apt-get install python3.10 \n \n# For Fedora \nsudo dnf install python3.10 \n\n# For MacOS\nbrew install python@3.10\n``` \n\n- git (for cloning the repository) \n \n```bash  \n# For Debian/Ubuntu \nsudo apt-get install git  \n\n# For Fedora \nsudo dnf install git  \n\n# For MacOS \nbrew install git \n```\n\n---\n\n## Scenario 1: pip + virtualenv (Debian/Ubuntu/Fedora)\n\n### For **Debian/Ubuntu**\n\n```bash\nsudo apt update \u0026\u0026 sudo apt install -y python3 python3-pip python3-venv git\n```\n\n### For **Fedora**\n\n```bash\nsudo dnf install -y python3 python3-pip python3-virtualenv git\n```\n\n### Setup\n\n```bash\ngit clone git@github.com:bibymaths/phoskintime.git\ncd phoskintime\n\n# Create and activate a virtual environment\npython3 -m venv venv\nsource venv/bin/activate\n\n# Install dependencies\npip install --upgrade pip\npip install -r requirements.txt\n```\n\n---\n\n## Scenario 2: Poetry + `pyproject.toml`\n\n### Install Poetry (all platforms)\n\n```bash\ncurl -sSL https://install.python-poetry.org | python3 -\n# Or: pip install poetry\n```\n\n### Setup\n\n```bash\ngit clone git@github.com:bibymaths/phoskintime.git\ncd phoskintime\n\n# Install dependencies\npoetry install\n\n# Optional: activate shell within poetry env\npoetry shell\n```\n\n---\n\n## Scenario 3: Using [`uv`](https://github.com/astral-sh/uv) (fast, isolated pip alternative)\n\n### Install `uv`\n\n```bash\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n```\n\n### Setup\n\n```bash\ngit clone git@github.com:bibymaths/phoskintime.git\ncd phoskintime\n\n# Create virtual environment and install deps fast\nuv venv\nsource .venv/bin/activate\nuv pip install -r requirements.txt\n```\n\n---\n\n## Scenario 4: Conda or Mamba (Anaconda/Miniconda users)\n\n### Setup\n\n```bash\ngit clone git@github.com:bibymaths/phoskintime.git\ncd phoskintime\n\n# Create and activate conda environment\nconda create -n phoskintime python=3.10 -y\nconda activate phoskintime\n\n# Install dependencies\npip install -r requirements.txt\n```\n\nOr if using `pyproject.toml`, add:\n\n```bash\npip install poetry\npoetry install\n```\n\nFor making illustration diagrams, you need to install Graphviz. You can do this via conda or apt-get:\n\n```bash \nconda install graphviz\n``` \n\nor\n\n```bash \napt-get install graphviz\n``` \n\nor download it from the [Graphviz website](https://graphviz.gitlab.io/download/).\nFor macusers, you can use Homebrew:\n\n```bash  \nbrew install graphviz\n``` \n\nThe package is executed via the main script located in the `bin` directory. This script sets up the configuration,\nprocesses experimental data, performs parameter estimation, generates model simulations, and creates a comprehensive\nreport.\n\n### Main Script\n\nThe command-line arguments (such as parameter bounds, fixed parameters, bootstrapping iterations, and input file paths)\nare parsed by the configuration module. The main script then:\n\n- Loads the experimental data.\n- Logs the configuration and initializes output directories.\n- Processes each gene in parallel using a ProcessPoolExecutor.\n- Performs parameter estimation (toggling between sequential and normal modes as configured).\n- Generates ODE simulations and various plots.\n- Saves all results (including a global HTML report) in the designated output directory.\n\n# Command-Line Entry Point for the Phoskintime Pipeline\n\nThe `phoskintime` pipeline provides a command-line interface to execute various stages of the workflow,  \nincluding preprocessing, optimization, and modeling. Below are the usage instructions and examples for running  \nthe pipeline.\n\nBefore running any commands, ensure you are in the working directory one level above the project root (where the project  \ndirectory is visible).\n\n### Run All Stages\nRun the entire pipeline with the default (local) solver:\n```bash\npython phoskintime all\n```\n\n### Run Preprocessing Only\nExecute only the preprocessing stage:\n```bash\npython phoskintime prep\n```\n\n### Run Transcription-Factor-mRNA Optimization (TFOPT)\nRun TFOPT with the local solver:\n```bash\npython phoskintime tfopt --mode local\n```\n\nRun TFOPT with the evolutionary solver:\n```bash\npython phoskintime tfopt --mode evol\n```\n\n### Run Kinase-Phosphorylation Optimization (KINOPT)\nRun KINOPT with the local solver:\n```bash\npython phoskintime kinopt --mode local\n```\n\nRun KINOPT with the evolutionary solver:\n```bash\npython phoskintime kinopt --mode evol\n```\n\n### Run the Model\nExecute the modeling stage:\n```bash\npython phoskintime model\n```\n\n### Example\n\nHere’s a brief overview of the execution flow:\n\n1. **Configuration:**\n    - `config/config.py` and `config/constants.py` set up model options (e.g., `ODE_MODEL`, `ESTIMATION_MODE`), time\n      points, file paths, and logging settings.\n    - Command-line arguments are parsed to override default settings.\n\n2. **Parameter Estimation:**\n    - Depending on the chosen estimation mode (sequential or normal), functions from `paramest/seqest.py` or\n      `paramest/normest.py` are used.\n    - The toggle functionality in `paramest/toggle.py` selects the appropriate routine.\n    - Results are saved and passed for visualization.\n\n3. **Model Simulation and Visualization:**\n    - The selected ODE model (from `models/`) is used to simulate system dynamics.\n    - The `plotting` module generates plots (e.g., parallel coordinates, PCA, t-SNE, model fits, and sensitivity plots)\n      to visually inspect the results.\n\n4. **Reporting:**\n    - The `utils/display.py` and `utils/tables.py` modules save results and generate an HTML report summarizing the\n      analysis.\n\n## Modules\n\n- **Config Module:**\n    - `config/constants.py`: Global constants (model settings, time points, directories, scoring weights, etc.).\n    - `config/config.py`: Command-line argument parsing and configuration extraction.\n    - `config/logconf.py`: Logging configuration with colored console output and rotating file logs.\n    - `config/helpers/__init__.py`: Helper functions for generating parameter names, state labels, bounds, and clickable\n      file links.\n\n- **Models Module:**  \n  Implements various ODE models:\n    - `randmod.py`: Random model with vectorized state calculations.\n    - `distmod.py`: Distributive model.\n    - `succmod.py`: Successive model.\n    - `weights.py`: Weighting schemes for parameter estimation.\n\n- **Parameter Estimation Module:**\n    - `normest.py`: Normal (all timepoints at once) estimation.\n    - `toggle.py`: Utility to switch between estimation modes.\n    - `core.py`: Integrates estimation, ODE solving, error metrics, and visualization.\n\n- **Steady-State Module:**\n    - `initdist.py`, `initrand.py`, `initsucc.py`: Compute steady-state initial conditions for each model type.\n\n- **Sensitivity Module:**\n    - `analysis.py`: Implements Morris sensitivity analysis, including problem definition, sampling, analysis, and\n      plotting of sensitivity indices.\n\n- **Utils Module:**\n    - `display.py`: Helper functions for file/directory management, data loading, result saving, and report generation.\n    - `tables.py`: Functions to generate, save, and compile data tables (LaTeX and CSV).\n\n- **Bin Module:**\n    - `main.py`: The main entry point that orchestrates the entire workflow—from configuration and data loading to\n      parameter estimation, simulation, visualization, and report generation.\n\n## Customization\n\nYou can customize the package by:\n\n- Adjusting model parameters and bounds in the config files.\n- Choosing the ODE model type by modifying `ODE_MODEL` in `constants.py`.\n- Configuring output directories and file paths.\n- Modifying the logging behavior in `logconf.py`.\n- Tweaking the scoring function weights in `constants.py`.\n\n---\n\nPhosKinTime is a flexible and powerful package for modeling phosphorylation kinetics. Its modular design allows\nresearchers to simulate different mechanistic models, estimate kinetic parameters, analyze parameter sensitivity, and\ngenerate comprehensive visual and tabular reports. Whether you are exploring basic kinetic hypotheses or conducting\nin-depth sensitivity analysis, PhosKinTime offers the necessary tools for robust model-based analysis.\n\nFor more information, please refer to the individual module documentation and source code.\n\n## License\n\nThis package is distributed under the BSD 3-Clause License.  \nSee the [LICENSE](./LICENSE) file for full details.\n\n--- \n\n[//]: # (![Goal]\u0026#40;static/images/goal_2.png\u0026#41;)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbibymaths%2Fphoskintime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbibymaths%2Fphoskintime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbibymaths%2Fphoskintime/lists"}