Metadata-Version: 2.4
Name: proteoflux
Version: 1.8.8
Summary: Transparent and reproducible proteomics analysis pipeline
Author-email: Biozentrum Proteomics Core Facility <dariush.mollet@unibas.ch>
License: MIT License
        
        Copyright (c) 2026 Biozentrum, University of Basel
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
        
Project-URL: Repository, https://github.com/afanc/proteoflux
Project-URL: Issues, https://github.com/afanc/proteoflux/issues
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas<3.0,>=2.1
Requires-Dist: numpy<2.2,>=1.24
Requires-Dist: scanpy==1.11.0
Requires-Dist: numba==0.61.0
Requires-Dist: matplotlib
Requires-Dist: seaborn
Requires-Dist: typer[all]
Requires-Dist: pyyaml
Requires-Dist: scikit-learn
Requires-Dist: scikit-misc
Requires-Dist: missingno
Requires-Dist: torch
Requires-Dist: fastcluster
Requires-Dist: anndata==0.11.4
Requires-Dist: pyarrow
Requires-Dist: polars==1.36.1
Requires-Dist: openpyxl
Requires-Dist: xlsxwriter
Requires-Dist: InquirerPy
Requires-Dist: inmoose
Requires-Dist: directlfq[dask]
Requires-Dist: tqdm
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Dynamic: license-file

# ProteoFlux
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18640999.svg)](https://doi.org/10.5281/zenodo.18640998)

ProteoFlux is an open-source Python framework for transparent, reproducible downstream analysis of quantitative proteomics data.

It operates on quantitative outputs generated by upstream search and quantification tools and provides a unified workflow for:

- Protein-centric proteomics  
- Peptide-centric analyses  
- Phosphoproteomics (with optional protein-level covariate adjustment)

ProteoFlux emphasizes:

- Explicit data semantics  
- Transparent preprocessing  
- Deterministic statistical modeling  
- Fully reproducible outputs  

---

## Overview

![ProteoFlux overview](assets/proteoflux_overview.png)

ProteoFlux takes a single YAML configuration file and produces:

- Harmonized and preprocessed quantification data
- Differential expression results using a limma-based empirical Bayes framework
- Principal component analysis (PCA), multidimensional scaling (MDS), and hierarchical clustering
- A structured multi-page PDF report
- Portable `.h5ad` files compatible with [ProteoViewer](https://github.com/Afanc/proteoviewer)
- Summary tables in Excel

---

## Installation

Python ≥ 3.9 required.

### Install from source (recommended)

```bash
git clone https://github.com/YOUR-ORG/proteoflux.git
cd proteoflux
pip install -e .
```

This installs ProteoFlux in editable mode.

---

## Quickstart (CLI)

List available configuration templates:

```bash
proteoflux templates
```

Create a template:

```bash
proteoflux init spectronaut-proteomics --path config.yaml
```

Edit the file and then run the full pipeline:

```bash
proteoflux run --config config.yaml
```

---

## Output Files

| File | Description |
|------|------------|
| `*.h5ad` | Full AnnData object with raw, normalized, imputed data, statistics, embeddings, and metadata |
| `*.xlsx` | Differential expression summary table |
| `*.pdf` | Multi-page QC and analysis report |

The `.h5ad` files are compatible with [ProteoViewer](https://github.com/Afanc/proteoviewer), an interactive visualization tool for ProteoFlux outputs.

---

## Using ProteoFlux as a Python Library

ProteoFlux can also be used programmatically:

```python
import yaml
from proteoflux.main import run_pipeline

config = yaml.safe_load(open("config.yaml")) #or use a dict
run_pipeline(config)
```

This allows:

- Integration into larger workflows
- Batch processing
- Use inside Jupyter notebooks
- Custom downstream analysis of AnnData objects

All behavior is controlled by the same YAML schema used by the CLI.

---

## Configuration

All parameters are defined in a single YAML configuration file. We recommend starting with a template:

```bash
proteoflux templates
proteoflux init TEMPLATE_NAME
```

Full parameter reference:

See the configuration guide [docs/CONFIGURATION.md](docs/CONFIGURATION.md).

---

## Examples

Runnable, reduced example datasets and matching configs are provided under `examples/`:

- `examples/searle_small/`: small DIA proteomics example (Spectronaut export subset)
- `examples/phospho_small/`: phosphoproteomics example with an injected flow-through covariate run (Spectronaut export subsets)

Each example folder contains a `README.md` with a minimal command to run the pipeline (typically `proteoflux run --config <config>.yaml`) and the required input files (data + annotation, if applicable).

---

## Paper

The JOSS manuscript source is provided as [paper.md](paper.md).

---

## License

ProteoViewer is released under the MIT License. See the LICENSE file for details.

---

## Citation

If you use ProteoFlux in your work, please cite:

ProteoFlux (latest version).  
Zenodo. https://doi.org/10.5281/zenodo.18640998

A peer-reviewed publication is currently under submission.
