# animesh/maxlfq architecture

> Architecture diagram of the GitHub repository animesh/maxlfq, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/animesh/maxlfq
- Repository: https://github.com/animesh/maxlfq

## Overview

maxLFQ is an importable NumPy/SciPy implementation and CLI for turning MaxQuant peptide tables into protein-level LFQ values. Users enter through the Python API or command line; the workflow constructs peptide species, optionally filters them, normalizes samples, computes protein-wise peptide ratios, reconstructs profiles, and rescales them. Results expose LFQ values and intermediate diagnostics. The single module contains the indexed core; the workflow stages are documented in the README, while several implementation details were not sampled.

Main entry points: [`maxlfq.py`](https://github.com/animesh/maxlfq/blob/main/maxlfq.py) (Workflow runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry points"]
  node_python_api["Python API<br/>[maxlfq.py]"]
  node_cli["Command line<br/>[maxlfq.py]"]
end

subgraph group_quantification["Quantification workflow"]
  node_workflow["Workflow runner<br/>[maxlfq.py]"]
  node_species["Species matrix<br/>[maxlfq.py]"]
  node_filters["Optional filters<br/>[maxlfq.py]"]
  node_normalization["Delayed normalization<br/>[maxlfq.py]"]
  node_ratios["Pairwise ratios<br/>[maxlfq.py]"]
  node_profiles["Profile reconstruction<br/>[maxlfq.py]"]
  node_rescaling["Anchor rescaling<br/>[maxlfq.py]"]
end

subgraph group_outputs["Results"]
  node_result["MaxLFQ result<br/>[maxlfq.py]"]
  node_lfq["Protein LFQ matrix<br/>[maxlfq.py]"]
  node_diagnostics["Workflow diagnostics<br/>[maxlfq.py]"]
end

node_analyst(("Analyst"))
node_table["MaxQuant table"]

node_analyst -->|"calls"| node_python_api
node_analyst -->|"runs"| node_cli
node_table -->|"provides input"| node_python_api
node_table -->|"provides input"| node_cli
node_python_api -->|"runs"| node_workflow
node_cli -->|"dispatches to"| node_workflow
node_workflow -->|"constructs"| node_species
node_workflow -->|"applies optionally"| node_filters
node_workflow -->|"normalizes"| node_normalization
node_workflow -->|"computes ratios"| node_ratios
node_workflow -->|"reconstructs"| node_profiles
node_workflow -->|"rescales"| node_rescaling
node_workflow -->|"returns"| node_result
node_result -->|"contains"| node_lfq
node_result -->|"contains"| node_diagnostics

click node_python_api "https://github.com/animesh/maxlfq/blob/main/maxlfq.py"
click node_cli "https://github.com/animesh/maxlfq/blob/main/maxlfq.py"
click node_workflow "https://github.com/animesh/maxlfq/blob/main/maxlfq.py"
click node_species "https://github.com/animesh/maxlfq/blob/main/maxlfq.py"
click node_filters "https://github.com/animesh/maxlfq/blob/main/maxlfq.py"
click node_normalization "https://github.com/animesh/maxlfq/blob/main/maxlfq.py"
click node_ratios "https://github.com/animesh/maxlfq/blob/main/maxlfq.py"
click node_profiles "https://github.com/animesh/maxlfq/blob/main/maxlfq.py"
click node_rescaling "https://github.com/animesh/maxlfq/blob/main/maxlfq.py"
click node_result "https://github.com/animesh/maxlfq/blob/main/maxlfq.py"
click node_lfq "https://github.com/animesh/maxlfq/blob/main/maxlfq.py"
click node_diagnostics "https://github.com/animesh/maxlfq/blob/main/maxlfq.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_python_api,node_cli toneBlue
class node_workflow,node_species,node_filters,node_normalization,node_ratios,node_profiles,node_rescaling toneAmber
class node_result,node_lfq,node_diagnostics toneMint
class node_analyst,node_table toneIndigo
```

## Components

### User entry points

- [Python API](https://github.com/animesh/maxlfq/blob/main/maxlfq.py): `maxlfq.py`
- [Command line](https://github.com/animesh/maxlfq/blob/main/maxlfq.py): `maxlfq.py`

### Quantification workflow

- [Workflow runner](https://github.com/animesh/maxlfq/blob/main/maxlfq.py): `maxlfq.py`
- [Species matrix](https://github.com/animesh/maxlfq/blob/main/maxlfq.py): `maxlfq.py`
- [Optional filters](https://github.com/animesh/maxlfq/blob/main/maxlfq.py): `maxlfq.py`
- [Delayed normalization](https://github.com/animesh/maxlfq/blob/main/maxlfq.py): `maxlfq.py`
- [Pairwise ratios](https://github.com/animesh/maxlfq/blob/main/maxlfq.py): `maxlfq.py`
- [Profile reconstruction](https://github.com/animesh/maxlfq/blob/main/maxlfq.py): `maxlfq.py`
- [Anchor rescaling](https://github.com/animesh/maxlfq/blob/main/maxlfq.py): `maxlfq.py`

### Results

- [MaxLFQ result](https://github.com/animesh/maxlfq/blob/main/maxlfq.py): `maxlfq.py`
- [Protein LFQ matrix](https://github.com/animesh/maxlfq/blob/main/maxlfq.py): `maxlfq.py`
- [Workflow diagnostics](https://github.com/animesh/maxlfq/blob/main/maxlfq.py): `maxlfq.py`

### Other components

- **Analyst**
- **MaxQuant table**

## Connections

- Analyst → Python API: calls (evidence: `README.md`)
- Analyst → Command line: runs (evidence: `README.md`)
- MaxQuant table → Python API: provides input (evidence: `README.md`)
- MaxQuant table → Command line: provides input (evidence: `README.md`)
- Python API → Workflow runner: runs (evidence: `README.md`)
- Command line → Workflow runner: dispatches to (evidence: `maxlfq.py`)
- Workflow runner → Species matrix: constructs (evidence: `maxlfq.py`)
- Workflow runner → Optional filters: applies optionally (evidence: `README.md`)
- Workflow runner → Delayed normalization: normalizes (evidence: `README.md`)
- Workflow runner → Pairwise ratios: computes ratios (evidence: `README.md`)
- Workflow runner → Profile reconstruction: reconstructs (evidence: `README.md`)
- Workflow runner → Anchor rescaling: rescales (evidence: `README.md`)
- Workflow runner → MaxLFQ result: returns (evidence: `README.md`)
- MaxLFQ result → Protein LFQ matrix: contains (evidence: `README.md`)
- MaxLFQ result → Workflow diagnostics: contains (evidence: `README.md`)
