apb-export-ui 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. apb_export_ui-0.3.0/.python-version +1 -0
  2. apb_export_ui-0.3.0/Dockerfile +25 -0
  3. apb_export_ui-0.3.0/LICENSE +21 -0
  4. apb_export_ui-0.3.0/Makefile +71 -0
  5. apb_export_ui-0.3.0/PKG-INFO +96 -0
  6. apb_export_ui-0.3.0/README.md +69 -0
  7. apb_export_ui-0.3.0/docs/dependencies.md +34 -0
  8. apb_export_ui-0.3.0/docs/deploy.md +45 -0
  9. apb_export_ui-0.3.0/docs/images/anndata-structure.png +0 -0
  10. apb_export_ui-0.3.0/docs/images/quality-control.png +0 -0
  11. apb_export_ui-0.3.0/docs/images/upload.png +0 -0
  12. apb_export_ui-0.3.0/docs/index.md +51 -0
  13. apb_export_ui-0.3.0/docs/metamorpheus-example.md +29 -0
  14. apb_export_ui-0.3.0/docs/source-baseline.json +33 -0
  15. apb_export_ui-0.3.0/docs/web.md +71 -0
  16. apb_export_ui-0.3.0/pyproject.toml +162 -0
  17. apb_export_ui-0.3.0/pyproject.toml.orig +139 -0
  18. apb_export_ui-0.3.0/scripts/check_docs.py +23 -0
  19. apb_export_ui-0.3.0/scripts/check_frontend.py +40 -0
  20. apb_export_ui-0.3.0/scripts/smoke.py +368 -0
  21. apb_export_ui-0.3.0/src/apb_export_ui/__init__.py +1 -0
  22. apb_export_ui-0.3.0/src/apb_export_ui/py.typed +1 -0
  23. apb_export_ui-0.3.0/src/apb_export_ui/web/__init__.py +0 -0
  24. apb_export_ui-0.3.0/src/apb_export_ui/web/cli.py +230 -0
  25. apb_export_ui-0.3.0/src/apb_export_ui/web/example_build.py +126 -0
  26. apb_export_ui-0.3.0/src/apb_export_ui/web/example_data/datasets.csv +15 -0
  27. apb_export_ui-0.3.0/src/apb_export_ui/web/example_data/examples.csv +6 -0
  28. apb_export_ui-0.3.0/src/apb_export_ui/web/example_data/msangel.sdrf.tsv +7 -0
  29. apb_export_ui-0.3.0/src/apb_export_ui/web/example_data/wombat.sdrf.tsv +7 -0
  30. apb_export_ui-0.3.0/src/apb_export_ui/web/examples.py +375 -0
  31. apb_export_ui-0.3.0/src/apb_export_ui/web/exports.py +139 -0
  32. apb_export_ui-0.3.0/src/apb_export_ui/web/hints.json +426 -0
  33. apb_export_ui-0.3.0/src/apb_export_ui/web/index.py +70 -0
  34. apb_export_ui-0.3.0/src/apb_export_ui/web/job.py +384 -0
  35. apb_export_ui-0.3.0/src/apb_export_ui/web/options.py +205 -0
  36. apb_export_ui-0.3.0/src/apb_export_ui/web/outputs.json +211 -0
  37. apb_export_ui-0.3.0/src/apb_export_ui/web/qc.py +153 -0
  38. apb_export_ui-0.3.0/src/apb_export_ui/web/server.py +360 -0
  39. apb_export_ui-0.3.0/src/apb_export_ui/web/static/assets/index-C-dtSECs.js +3846 -0
  40. apb_export_ui-0.3.0/src/apb_export_ui/web/static/assets/index-C49C2NJ5.css +1 -0
  41. apb_export_ui-0.3.0/src/apb_export_ui/web/static/index.html +39 -0
  42. apb_export_ui-0.3.0/src/apb_export_ui/web/store.py +218 -0
  43. apb_export_ui-0.3.0/uv.lock +3875 -0
  44. apb_export_ui-0.3.0/web/.gitignore +1 -0
  45. apb_export_ui-0.3.0/web/index.html +38 -0
  46. apb_export_ui-0.3.0/web/package-lock.json +1978 -0
  47. apb_export_ui-0.3.0/web/package.json +26 -0
  48. apb_export_ui-0.3.0/web/src/about.ts +68 -0
  49. apb_export_ui-0.3.0/web/src/api.ts +185 -0
  50. apb_export_ui-0.3.0/web/src/app.css +300 -0
  51. apb_export_ui-0.3.0/web/src/app.ts +151 -0
  52. apb_export_ui-0.3.0/web/src/downloads.ts +56 -0
  53. apb_export_ui-0.3.0/web/src/file-preview.ts +64 -0
  54. apb_export_ui-0.3.0/web/src/job-status.ts +86 -0
  55. apb_export_ui-0.3.0/web/src/lit.ts +2 -0
  56. apb_export_ui-0.3.0/web/src/plotly-dist.d.ts +4 -0
  57. apb_export_ui-0.3.0/web/src/plotly.ts +1 -0
  58. apb_export_ui-0.3.0/web/src/qc-panel.ts +96 -0
  59. apb_export_ui-0.3.0/web/src/representation.ts +256 -0
  60. apb_export_ui-0.3.0/web/src/result-view.ts +58 -0
  61. apb_export_ui-0.3.0/web/src/structure-panel.ts +204 -0
  62. apb_export_ui-0.3.0/web/src/traces.ts +62 -0
  63. apb_export_ui-0.3.0/web/src/upload-form.ts +409 -0
  64. apb_export_ui-0.3.0/web/tests/downloads.test.ts +82 -0
  65. apb_export_ui-0.3.0/web/tests/job-status.test.ts +47 -0
  66. apb_export_ui-0.3.0/web/tests/structure.test.ts +127 -0
  67. apb_export_ui-0.3.0/web/tests/traces.test.ts +52 -0
  68. apb_export_ui-0.3.0/web/tests/upload-form.test.ts +62 -0
  69. apb_export_ui-0.3.0/web/tsconfig.json +29 -0
  70. apb_export_ui-0.3.0/web/vite.config.ts +17 -0
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,25 @@
1
+ FROM node:22-bookworm-slim AS frontend
2
+ WORKDIR /frontend
3
+ COPY web/package.json web/package-lock.json ./
4
+ RUN npm ci
5
+ COPY web/ ./
6
+ RUN npm test && npm run build
7
+
8
+ FROM ghcr.io/astral-sh/uv:0.12.17-python3.13-trixie-slim AS runtime
9
+ ENV UV_COMPILE_BYTECODE=1 \
10
+ UV_LINK_MODE=copy \
11
+ UV_PYTHON_DOWNLOADS=never \
12
+ UV_PROJECT_ENVIRONMENT=/app/.venv \
13
+ PATH=/app/.venv/bin:$PATH
14
+ ARG UI_REVISION=unknown
15
+ # The APB package versions are in the image's uv.lock.
16
+ LABEL org.opencontainers.image.source="https://github.com/anndata-omics-bridge/apb-export-ui" \
17
+ org.opencontainers.image.revision=$UI_REVISION
18
+ RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates && rm -rf /var/lib/apt/lists/*
19
+ WORKDIR /app
20
+ COPY pyproject.toml uv.lock README.md LICENSE ./
21
+ COPY src/ ./src/
22
+ COPY --from=frontend /src/apb_export_ui/web/static/ ./src/apb_export_ui/web/static/
23
+ RUN --mount=type=cache,target=/root/.cache/uv uv sync --locked --no-dev --no-editable
24
+ ENTRYPOINT ["apb-export-web", "serve", "--host", "0.0.0.0", "--port", "8000", "--store", "/data/store"]
25
+ EXPOSE 8000
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Witold Wolski
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,71 @@
1
+ VENV_BIN := .venv/bin
2
+ IMAGE ?= ghcr.io/anndata-omics-bridge/apb-export-ui
3
+ IMAGE_TAG ?= local
4
+ UI_REVISION ?= $(shell git rev-parse --verify HEAD 2>/dev/null || echo uncommitted)
5
+ EXAMPLES_WORKSPACE ?= ..
6
+ WEB_EXAMPLES ?= build/web-examples
7
+
8
+ .DEFAULT_GOAL := help
9
+ .PHONY: help sync format format-check lint typecheck deps test web frontend-check docs build image smoke-wheel smoke-container check check-full web-examples clean
10
+
11
+ help: ## Show developer commands
12
+ @grep -E '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) | awk 'BEGIN{FS=":.*?## "}{printf " %-20s %s\n", $$1, $$2}'
13
+
14
+ sync: ## Install the committed application lock
15
+ uv sync --locked --group dev
16
+
17
+ format: ## Format and autofix Python source, tests and scripts
18
+ $(VENV_BIN)/ruff format src tests scripts
19
+ $(VENV_BIN)/ruff check --fix src tests scripts
20
+
21
+ format-check: ## Check formatting without rewriting files
22
+ $(VENV_BIN)/ruff format --check src tests scripts
23
+
24
+ lint: ## Run Ruff
25
+ $(VENV_BIN)/ruff check src tests scripts
26
+
27
+ typecheck: ## Run standard Pyright strict
28
+ $(VENV_BIN)/pyright
29
+
30
+ deps: ## Validate dependency declarations
31
+ $(VENV_BIN)/deptry .
32
+
33
+ test: ## Run synthetic web, job and QC tests with branch coverage
34
+ $(VENV_BIN)/pytest --cov --cov-branch
35
+
36
+ web: ## Rebuild the static frontend shipped in the Python package
37
+ cd web && npm ci && npm test && npm run build
38
+
39
+ frontend-check: ## Test TypeScript and compare fresh and packaged assets
40
+ cd web && npm ci && npm test
41
+ $(VENV_BIN)/python scripts/check_frontend.py
42
+
43
+ docs: ## Check local documentation links and build the site with warnings as errors
44
+ $(VENV_BIN)/python scripts/check_docs.py
45
+ uv run --locked --only-group docs zensical build --clean --strict
46
+
47
+ build: ## Build and validate source and wheel distributions
48
+ uv lock --check
49
+ uv build
50
+ $(VENV_BIN)/twine check dist/*
51
+
52
+ image: ## Build the application image from this repository alone
53
+ docker build --build-arg UI_REVISION=$(UI_REVISION) -t $(IMAGE):$(IMAGE_TAG) .
54
+
55
+ smoke-wheel: ## Test a clean wheel installation and prefixed HTTP routes
56
+ $(VENV_BIN)/python scripts/smoke.py wheel
57
+
58
+ smoke-container: ## Test the image without source mounts
59
+ $(VENV_BIN)/python scripts/smoke.py container --image $(IMAGE):$(IMAGE_TAG)
60
+
61
+ check: ## Run every merge-blocking gate
62
+ uv lock --check
63
+ $(MAKE) format-check lint typecheck deps test frontend-check docs build
64
+
65
+ check-full: check smoke-wheel image smoke-container ## Run every pre-push acceptance check
66
+
67
+ web-examples: ## Stage complete Fixture Manager inputs for the packaged web selection
68
+ $(VENV_BIN)/apb-export-web examples build "$(WEB_EXAMPLES)" "$(EXAMPLES_WORKSPACE)"
69
+
70
+ clean: ## Remove generated quality and packaging output
71
+ $(VENV_BIN)/python -c "import shutil; [shutil.rmtree(path, ignore_errors=True) for path in ('build', 'dist', '.pytest_cache', '.ruff_cache')]"
@@ -0,0 +1,96 @@
1
+ Metadata-Version: 2.4
2
+ Name: apb-export-ui
3
+ Version: 0.3.0
4
+ Summary: Locked web application for APB Export
5
+ Author: Witold Wolski
6
+ Author-email: Witold Wolski <wew@fgcz.ethz.ch>
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Requires-Dist: anndata>=0.11
10
+ Requires-Dist: apb-export>=0.2.3,<0.3
11
+ Requires-Dist: apb2[duckdb,excel]>=0.1.4,<0.2
12
+ Requires-Dist: apb-catalog>=0.1.6,<0.2
13
+ Requires-Dist: apb-fasta>=0.1.2,<0.2
14
+ Requires-Dist: protein-fasta>=0.3.2,<0.4
15
+ Requires-Dist: prozor>=0.1.2,<0.2
16
+ Requires-Dist: cyclopts>=4,<5
17
+ Requires-Dist: fastapi>=0.142,<1
18
+ Requires-Dist: loguru>=0.7,<1
19
+ Requires-Dist: mudata>=0.4.1,<0.5
20
+ Requires-Dist: numpy>=2,<3
21
+ Requires-Dist: polars>=1.43,<2
22
+ Requires-Dist: python-multipart>=0.0.32,<1
23
+ Requires-Dist: uvicorn>=0.54,<1
24
+ Requires-Dist: psutil>=7
25
+ Requires-Python: >=3.13
26
+ Description-Content-Type: text/markdown
27
+
28
+ # APB Export UI
29
+
30
+ The upload page, server, job runner and QC presentation for [APB Export](https://github.com/anndata-omics-bridge/apb-export), released independently with a locked Python environment.
31
+
32
+ Documentation: [anndata-omics-bridge.github.io/apb-export-ui](https://anndata-omics-bridge.github.io/apb-export-ui/). Try it: [apps-dev.bfabric.org/apb-export](https://apps-dev.bfabric.org/apb-export/).
33
+
34
+ ![The upload page: DIA-NN chosen as the software, its report, parameter log and sample table added, and AnnData / MuData chosen among the outputs.](docs/images/upload.png)
35
+
36
+ ![Quality control of the precursor level: intensity density per sample, CV per feature within conditions A and B, and detected and missing counts per sample.](docs/images/quality-control.png)
37
+
38
+ The screenshots show a synthetic DIA-NN 1.8.1 report: 600 made-up proteins, six runs, two conditions.
39
+
40
+ ## Install on your computer
41
+
42
+ macOS and Linux, in a terminal:
43
+
44
+ ```bash
45
+ curl -LsSf https://raw.githubusercontent.com/anndata-omics-bridge/apb-export-ui/main/launchers/install.sh | sh
46
+ ```
47
+
48
+ Windows: download [install.bat](https://github.com/anndata-omics-bridge/apb-export-ui/blob/main/launchers/install.bat) and double-click it. macOS users who prefer Finder can use [install.command](https://github.com/anndata-omics-bridge/apb-export-ui/blob/main/launchers/install.command) after `chmod +x install.command`; Gatekeeper asks once, under System Settings → Privacy & Security.
49
+
50
+ The launcher installs [uv](https://docs.astral.sh/uv/) if it is missing, then this app from PyPI with Python 3.13, and opens http://127.0.0.1:8770. Run it again, or `apb-export-web start`, to start the app later. Jobs stay in `~/APB-export` for 30 days. The install also provides the `apb2`, `apb-export` and `apb-fasta` commands. It has no pMultiQC yet, so **QPX** gives the tables without a report; the [hosted app](https://apps-dev.bfabric.org/apb-export/) makes the report.
51
+
52
+ ## Run
53
+
54
+ `apb-export-web` without arguments shows help. Use `apb-export-web serve --help` for server options.
55
+
56
+ From a workspace checkout with the selected fixtures already downloaded through APB Studio:
57
+
58
+ ```bash
59
+ uv sync --locked --group dev
60
+ uv run --locked apb-export-web examples build
61
+ uv run --locked apb-export-web serve
62
+ ```
63
+
64
+ Open http://127.0.0.1:8770; stop the server with Ctrl-C. Stage examples once, then rerun staging when the inputs change.
65
+
66
+ Running `serve` again gracefully restarts a verified instance of this app on the same address. An unrelated listener is left running, and startup exits before changing the job store.
67
+
68
+ `examples build` defaults to `build/web-examples` and the parent APB workspace. Optional positional arguments are the destination directory followed by the workspace root.
69
+
70
+ The packaged [web selection](src/apb_export_ui/web/example_data/datasets.csv) includes two complete MaxQuant folders, FGCZ searches of the ProteoBench Q Exactive and Astral DDA samples with evidence, peptidoforms, peptides and protein groups. It excludes peptide-entrapment datasets. Acquire the selected fixtures through Studio's Fixture Manager before staging; both MaxQuant folders are in Studio's `apb_examples` inventory.
71
+
72
+ `examples build` also indexes the folder: `options.json` (software, outputs and the inputs each target takes, read once from its `--help`), `examples.json` and `previews/`. `examples index DIRECTORY` rewrites that index for a staged folder, an empty one included. `serve` only reads it: it finds `build/web-examples` in the current directory or its nearest parent, or takes a positional directory, and refuses a folder without an index or one indexed with other installed commits.
73
+
74
+ Python 3.13 is the tested interpreter; Node 22 is used only for frontend development and builds. The installed wheel serves its packaged assets without Node.
75
+
76
+ Where `apb-pmultiqc` is installed, as in the image and a development checkout, choose **pMultiQC / QPX** to generate a report immediately. Finished jobs offer **Open pMultiQC report** in a new tab, plus downloads for QPX tables, the HTML and a full report bundle. Sample groups are optional; retention times come through the exporter catalogue.
77
+
78
+ - [Web application](docs/web.md): uploads, examples, QC and job behavior
79
+ - [Deployment](docs/deploy.md): image build, migration and rollback
80
+ - [Dependency policy](docs/dependencies.md): locked APB releases and deliberate upgrades
81
+ - [Source baseline](docs/source-baseline.json): committed revisions recorded before extraction
82
+
83
+ ## Development
84
+
85
+ ```bash
86
+ make check
87
+ make check-full
88
+ ```
89
+
90
+ `make check` runs Python quality gates, synthetic web tests, frontend tests and asset freshness, documentation links, and package validation. `make check-full` also installs the wheel into a fresh environment, runs a prefixed HTTP conversion, builds the image and tests it without source mounts. `make web` deliberately rebuilds the committed frontend bundle after a frontend change.
91
+
92
+ ## Ownership
93
+
94
+ Distribution: `apb-export-ui`; Python namespace: `apb_export_ui`; executable: `apb-export-web`. Existing HTTP and persisted job interfaces remain supported; completed reports add an inline HTML route. Conversion stays in the installed `apb-export`, `apb2` and `apb-fasta` CLIs, and report execution in `apb-pmultiqc`; sibling Python imports use only their public API modules.
95
+
96
+ Extracted from APB Export commit `10e1166363259f7746c8d03d9bb4c11947118e0c`. This repository includes the original MIT license and attribution. Real example data remains external.
@@ -0,0 +1,69 @@
1
+ # APB Export UI
2
+
3
+ The upload page, server, job runner and QC presentation for [APB Export](https://github.com/anndata-omics-bridge/apb-export), released independently with a locked Python environment.
4
+
5
+ Documentation: [anndata-omics-bridge.github.io/apb-export-ui](https://anndata-omics-bridge.github.io/apb-export-ui/). Try it: [apps-dev.bfabric.org/apb-export](https://apps-dev.bfabric.org/apb-export/).
6
+
7
+ ![The upload page: DIA-NN chosen as the software, its report, parameter log and sample table added, and AnnData / MuData chosen among the outputs.](docs/images/upload.png)
8
+
9
+ ![Quality control of the precursor level: intensity density per sample, CV per feature within conditions A and B, and detected and missing counts per sample.](docs/images/quality-control.png)
10
+
11
+ The screenshots show a synthetic DIA-NN 1.8.1 report: 600 made-up proteins, six runs, two conditions.
12
+
13
+ ## Install on your computer
14
+
15
+ macOS and Linux, in a terminal:
16
+
17
+ ```bash
18
+ curl -LsSf https://raw.githubusercontent.com/anndata-omics-bridge/apb-export-ui/main/launchers/install.sh | sh
19
+ ```
20
+
21
+ Windows: download [install.bat](https://github.com/anndata-omics-bridge/apb-export-ui/blob/main/launchers/install.bat) and double-click it. macOS users who prefer Finder can use [install.command](https://github.com/anndata-omics-bridge/apb-export-ui/blob/main/launchers/install.command) after `chmod +x install.command`; Gatekeeper asks once, under System Settings → Privacy & Security.
22
+
23
+ The launcher installs [uv](https://docs.astral.sh/uv/) if it is missing, then this app from PyPI with Python 3.13, and opens http://127.0.0.1:8770. Run it again, or `apb-export-web start`, to start the app later. Jobs stay in `~/APB-export` for 30 days. The install also provides the `apb2`, `apb-export` and `apb-fasta` commands. It has no pMultiQC yet, so **QPX** gives the tables without a report; the [hosted app](https://apps-dev.bfabric.org/apb-export/) makes the report.
24
+
25
+ ## Run
26
+
27
+ `apb-export-web` without arguments shows help. Use `apb-export-web serve --help` for server options.
28
+
29
+ From a workspace checkout with the selected fixtures already downloaded through APB Studio:
30
+
31
+ ```bash
32
+ uv sync --locked --group dev
33
+ uv run --locked apb-export-web examples build
34
+ uv run --locked apb-export-web serve
35
+ ```
36
+
37
+ Open http://127.0.0.1:8770; stop the server with Ctrl-C. Stage examples once, then rerun staging when the inputs change.
38
+
39
+ Running `serve` again gracefully restarts a verified instance of this app on the same address. An unrelated listener is left running, and startup exits before changing the job store.
40
+
41
+ `examples build` defaults to `build/web-examples` and the parent APB workspace. Optional positional arguments are the destination directory followed by the workspace root.
42
+
43
+ The packaged [web selection](src/apb_export_ui/web/example_data/datasets.csv) includes two complete MaxQuant folders, FGCZ searches of the ProteoBench Q Exactive and Astral DDA samples with evidence, peptidoforms, peptides and protein groups. It excludes peptide-entrapment datasets. Acquire the selected fixtures through Studio's Fixture Manager before staging; both MaxQuant folders are in Studio's `apb_examples` inventory.
44
+
45
+ `examples build` also indexes the folder: `options.json` (software, outputs and the inputs each target takes, read once from its `--help`), `examples.json` and `previews/`. `examples index DIRECTORY` rewrites that index for a staged folder, an empty one included. `serve` only reads it: it finds `build/web-examples` in the current directory or its nearest parent, or takes a positional directory, and refuses a folder without an index or one indexed with other installed commits.
46
+
47
+ Python 3.13 is the tested interpreter; Node 22 is used only for frontend development and builds. The installed wheel serves its packaged assets without Node.
48
+
49
+ Where `apb-pmultiqc` is installed, as in the image and a development checkout, choose **pMultiQC / QPX** to generate a report immediately. Finished jobs offer **Open pMultiQC report** in a new tab, plus downloads for QPX tables, the HTML and a full report bundle. Sample groups are optional; retention times come through the exporter catalogue.
50
+
51
+ - [Web application](docs/web.md): uploads, examples, QC and job behavior
52
+ - [Deployment](docs/deploy.md): image build, migration and rollback
53
+ - [Dependency policy](docs/dependencies.md): locked APB releases and deliberate upgrades
54
+ - [Source baseline](docs/source-baseline.json): committed revisions recorded before extraction
55
+
56
+ ## Development
57
+
58
+ ```bash
59
+ make check
60
+ make check-full
61
+ ```
62
+
63
+ `make check` runs Python quality gates, synthetic web tests, frontend tests and asset freshness, documentation links, and package validation. `make check-full` also installs the wheel into a fresh environment, runs a prefixed HTTP conversion, builds the image and tests it without source mounts. `make web` deliberately rebuilds the committed frontend bundle after a frontend change.
64
+
65
+ ## Ownership
66
+
67
+ Distribution: `apb-export-ui`; Python namespace: `apb_export_ui`; executable: `apb-export-web`. Existing HTTP and persisted job interfaces remain supported; completed reports add an inline HTML route. Conversion stays in the installed `apb-export`, `apb2` and `apb-fasta` CLIs, and report execution in `apb-pmultiqc`; sibling Python imports use only their public API modules.
68
+
69
+ Extracted from APB Export commit `10e1166363259f7746c8d03d9bb4c11947118e0c`. This repository includes the original MIT license and attribution. Real example data remains external.
@@ -0,0 +1,34 @@
1
+ # Dependency policy
2
+
3
+ The UI is an application: commit its uv and npm lockfiles. Rebuilding a UI revision must install the same APB versions even when exporter development continues.
4
+
5
+ ## PyPI release (0.3.0)
6
+
7
+ The APB packages are PyPI ranges from the releases the paper cites; `uv.lock` pins the tested versions. `apb2` carries its `duckdb` and `excel` extras, for DuckDB results and MSAngel and ProlineStudio workbooks. `apb-pmultiqc` pins pMultiQC by Git commit, which PyPI refuses, so it sits in the `report` dependency group: groups stay out of the wheel's metadata, and `default-groups` installs it in development, tests, the smoke checks and the image. `uv tool install apb-export-ui` therefore has no report application, and the page offers QPX as tables only. Once a pMultiQC release carries the null-RT fix, `apb-pmultiqc` goes to PyPI and back into the dependencies.
8
+
9
+ ## Initial baseline
10
+
11
+ [The source snapshot](source-baseline.json) records committed APB revisions before extraction. Uncommitted sibling edits are excluded. The application manifest uses standard Git dependency URLs to pin all seven APB packages to full immutable SHAs: the six of this snapshot and, since the report environment below, `apb-pmultiqc`. At extraction its exporter revision was the commit after removal of the old web executable.
12
+
13
+ The seven packages are explicit application runtime requirements. Besides directly imported APIs and invoked CLIs, the application deliberately pins apb-catalog, protein-fasta and prozor to own the full APB toolchain selection. Development checks explain those application-only pins to deptry rather than relying on accidental transitive resolution.
14
+
15
+ ## Upgrade
16
+
17
+ 1. Choose tested releases for the APB packages being upgraded, or a remotely reachable `apb-pmultiqc` commit, and update their constraints
18
+ 2. Run `uv lock`, review the dependency diff, then `uv sync --locked --group dev`
19
+ 3. Run `make check-full`, including synthetic conversion with the installed CLIs
20
+ 4. Commit manifest and lock together; release a new UI image separately
21
+
22
+ `tool.uv.no-sources = true` disables dependency packages’ development-only sibling path overrides, so the application never interprets a sibling path as a directory inside another Git repository.
23
+
24
+ CI and image builds use locked synchronization and refuse a stale lockfile. APB source declarations contain neither local paths nor editable installs nor moving branch references. uv is pinned to 0.12.17 for development, CI and image builds.
25
+
26
+ Local sibling checkouts are unnecessary. Production installs non-editable packages, and the clean-wheel/container acceptance checks verify each installed APB package against the lock, by version or Git commit, and sole ownership of the web executable.
27
+
28
+ ## Report environment (0.2.0)
29
+
30
+ The QPX/report integration deliberately updates the exporter, APB2 and catalogue to the commits tested by the standalone report application, and adds an immutable `apb-pmultiqc` source pin. The initial extraction snapshot above remains historical. The manifest and committed lock are the current source of truth.
31
+
32
+ `apb-pmultiqc` also pins MultiQC 1.35 and a tested pMultiQC source revision with the null-RT fix, merged upstream on 29 October 2026 but not yet in a pMultiQC release, and pyOpenMS 3.5 compatibility, preserving Linux ARM builds. Its provenance and upstream status are documented in [the report application](https://github.com/anndata-omics-bridge/apb-pmultiqc/blob/main/docs/dependencies.md). The newer idXML peptide container is used in both search and consensus readers; QPX serialization remains in APB Export.
33
+
34
+ All web tests and installed wheel/container checks use tiny synthetic uploads. No corpus run, real vendor download or large-dataset report is part of the UI gates. Report-generation failures remain failed jobs rather than exposing a partial report link.
@@ -0,0 +1,45 @@
1
+ # Deployment
2
+
3
+ The standalone image is `ghcr.io/anndata-omics-bridge/apb-export-ui`. It builds from this repository and its committed lock; no sibling source checkouts are required.
4
+
5
+ ## Build and release
6
+
7
+ ```bash
8
+ uv sync --locked --group dev
9
+ make check-full
10
+ make image IMAGE_TAG=local
11
+ ```
12
+
13
+ The image builds the Lit/Vite frontend with Node 22, then installs the Python application using `uv sync --locked --no-dev --no-editable`. Node is absent from the runtime image. A label records the UI revision; the image's `uv.lock` records the APB versions and the report application's commit. The publication workflow publishes linux/arm64 and linux/amd64 images on UI version tags or manual dispatch; normal quality runs do not publish images.
14
+
15
+ ## Deployment interface
16
+
17
+ | Item | Configuration |
18
+ | --- | --- |
19
+ | Entrypoint | `apb-export-web serve --host 0.0.0.0 --port 8000 --store /data/store` |
20
+ | Arguments | `/examples --max-upload-mb 2048 --ttl-hours 24 --timeout-minutes 60` |
21
+ | Job store | `/data/store`, writable |
22
+ | Temporary uploads | `/data/tmp`, writable disk, set through `TMPDIR` |
23
+ | Example data | `/examples`, a staged and indexed directory, read-only; indexed with the image's installed APB commits |
24
+ | Health endpoint | `GET /api/options.json` |
25
+ | Public URL | https://apps-dev.bfabric.org/apb-export/ |
26
+
27
+ The proxy strips the public path prefix and redirects its bare prefix to a trailing slash. Frontend assets and API calls stay relative. The smoke checks exercise this through a local stripping proxy.
28
+
29
+ ## Migration and rollback
30
+
31
+ 1. Keep the currently deployed image reference and store/example mounts
32
+ 2. Test the new UI image before changing the FGCZ portal descriptor
33
+ 3. Stop the old service before starting the UI image against the same store; never share one writable store between concurrent services
34
+ 4. Change only the image reference to a tested UI image; retain the public URL, command arguments and mounts
35
+ 5. Verify options, uploads, QC and downloads; restore the previous image reference if rollback is needed
36
+
37
+ Completed jobs retain their existing layout. On restart, existing unfinished jobs are marked failed as before. The extraction does not deploy or publish a production image.
38
+
39
+ ## Examples
40
+
41
+ `apb-export-web examples build` stages the packaged web selection plus five supplementary examples; `make web-examples` delegates to the same command. Optional positional arguments select the destination directory and APB workspace; dataset keys resolve through Studio's managed fixture manifest. The selection includes the two complete FGCZ MaxQuant DDA folders from Studio's `apb_examples` inventory and excludes peptide-entrapment data. Selection, supplementary metadata and annotations ship with this package. The build ends by indexing the folder for the installation that ran it; the server refuses an index from other APB commits, so stage with the locked environment of the image you deploy, or rerun `apb-export-web examples index` with it.
42
+
43
+ Text tables and annotations are unpacked from gzip without changing their contents. No real fixtures are committed.
44
+
45
+ The [complete MetaMorpheus/IonStar example](metamorpheus-example.md) comes from the shared APB Zenodo collection through APB Studio's Fixture Manager. Acquire the `routine` or `apb_examples` inventory in Studio before staging. The UI has no dataset downloader or feature-sampling step.
@@ -0,0 +1,51 @@
1
+ # APB Export UI
2
+
3
+ A web page that converts the result of a proteomics quantification tool into the file a downstream tool opens, and shows quality control before you download it. Conversion runs in the installed [APB Export](https://anndata-omics-bridge.github.io/apb-export/), [APB2](https://anndata-omics-bridge.github.io/apb2/) and [apb-fasta](https://anndata-omics-bridge.github.io/apb-fasta/); pMultiQC reports run in [apb-pmultiqc](https://github.com/anndata-omics-bridge/apb-pmultiqc).
4
+
5
+ Try it: [apps-dev.bfabric.org/apb-export](https://apps-dev.bfabric.org/apb-export/)
6
+
7
+ The screenshots show a synthetic DIA-NN 1.8.1 report: 600 made-up proteins, six runs, two conditions.
8
+
9
+ ## Three steps
10
+
11
+ ![The upload page: DIA-NN chosen as the software, its report, parameter log and sample table added, and AnnData / MuData chosen among the outputs.](images/upload.png)
12
+
13
+ 1. Software: the tool that wrote the result; the page then lists the files that tool writes
14
+ 2. Files: the result, and optionally its parameter file, a sample annotation (SDRF or prolfquapp table) and a FASTA
15
+ 3. Output: the file a downstream tool reads, or an APB2 result
16
+ - Tools: AlphaPeptTools, exploreDE, msmu, MSstats, Perseus, prolfquapp, ProteoPy, QFeatures, pMultiQC / QPX
17
+ - APB2 result: AnnData / MuData, Parquet or DuckDB
18
+
19
+ ## Quality control
20
+
21
+ ![Quality control of the precursor level: intensity density per sample, CV per feature within conditions A and B, and detected and missing counts per sample.](images/quality-control.png)
22
+
23
+ - One tab per level and quantity, such as precursors and proteins
24
+ - Intensity density per sample
25
+ - CV per feature within each condition of the sample annotation; across all samples without one
26
+ - Detected and missing counts per sample
27
+
28
+ ## AnnData structure
29
+
30
+ ![The AnnData structure tab for the precursor level: var columns, X with its primary quantity, four layers, obs with the sample annotation, and uns["apb"].](images/anndata-structure.png)
31
+
32
+ - For H5AD and H5MU results: each AnnData's X, layers, obs, var, aligned slots and `uns["apb"]`
33
+ - Drawn from the APB sidecar `<result>.apb.json` beside the result
34
+ - Each layer shows its shape, type, missing values and range
35
+
36
+ ## Run it
37
+
38
+ ```bash
39
+ uv sync --locked --group dev
40
+ uv run --locked apb-export-web examples build
41
+ uv run --locked apb-export-web serve
42
+ ```
43
+
44
+ Open <http://127.0.0.1:8770>. The examples come from APB Studio's fixture store; see [Web application](web.md).
45
+
46
+ ## More
47
+
48
+ - [Web application](web.md): uploads, examples, QC and job behavior
49
+ - [Deployment](deploy.md): image build, migration and rollback
50
+ - [Dependency policy](dependencies.md): immutable APB revisions and deliberate upgrades
51
+ - [MetaMorpheus example](metamorpheus-example.md): the complete IonStar table behind the web example
@@ -0,0 +1,29 @@
1
+ # Complete MetaMorpheus example
2
+
3
+ The web example uses the complete IonStar quantification table: 798,879 original rows, 26 columns, 20 runs and 255,817,791 uncompressed bytes. All five E. coli spike-in levels in a human background are retained, with four technical replicate runs each. There is no feature sampling or condition filtering.
4
+
5
+ ## Source and acquisition
6
+
7
+ - Shared collection: [APB quantitative proteomics example datasets, version 1](https://doi.org/10.5281/zenodo.23691153), CC0
8
+ - Original archive: [PXD057758](https://www.ebi.ac.uk/pride/archive/projects/PXD057758), [Solivais et al., 2025](https://doi.org/10.1021/acs.jproteome.5c00065); original experiment [PXD003881](https://www.ebi.ac.uk/pride/archive/projects/PXD003881)
9
+ - Workflow: MetaMorpheus 1.0.7alpha identification followed by standalone FlashLFQ 1.3alpha quantification
10
+ - File: `IonStar_QuantResults-FlashLFQ_PIP_ECHO.zip` → `FlashLFQ_7772_Normed_Donor1_NoPip/QuantifiedPeaks.tsv`
11
+ - Original table SHA-256: `405d2ffdaa00cbfcaef7ecd4208fd9935837b5b655a7f5d3e89fcd62e874e35a`
12
+
13
+ APB Studio's Fixture Manager owns acquisition and verifies the pinned Zenodo files. Dataset key `zenodo/apb_examples/metamorpheus_ionstar` appears in both the shared `apb_examples` inventory and the 14-dataset `routine` inventory. It is not a ProteoBench scoring input and receives no benchmark FASTA. FlashLFQ settings are a companion file, not MetaMorpheus search parameters; no parameter upload is offered.
14
+
15
+ From APB Studio, run `uv run fixture download apb_examples` (or `routine`). Then run `apb-export-web examples build` from the UI repository.
16
+
17
+ Staging resolves corpus dataset keys through the managed `downloads.csv` manifest and copies complete files, unpacking gzip for web previews and conversion. The UI does not download or prepare scientific datasets itself; the former parser fixture and the 1,000-ion demonstration subset are not the active example.
18
+
19
+ ## Scientific preservation
20
+
21
+ Zenodo stores the original table with gzip compression only, matching FlashLFQ settings, the unchanged public SDRF, a separately identified analysis SDRF, provenance and checksums. Decompressing the table must reproduce the original SHA-256. Neither publication nor web staging reorders rows, transforms intensities, fills missing values, or removes control records. Conversion applies the installed APB rules.
22
+
23
+ The analysis SDRF covers every run. It maps the original raw stem to the calibrated output run name and uses the public term's concentration/ratio (`CR`) as the spike-in factor. This minimal projection is an explicit workaround for the pMultiQC QPX reader interpreting every varying annotation column as a condition and semicolons as factor separators. Complete original metadata, including biological/technical replicate IDs and original filenames, remains in the original SDRF and provenance.
24
+
25
+ The archive directory's `NoPip` name must not be interpreted as disabling MBR: its preserved settings report normalization and match-between-runs enabled, with MBR FDR threshold 0.05. The source has RT columns. The locked APB2 MetaMorpheus rule (apb2 `45ffc2c`) reads them, and the locked apb-catalog (`f40edc0`) catalogues Peak RT Apex in minutes, so the QPX export carries RT, converted to seconds, into the report.
26
+
27
+ ## Local migration
28
+
29
+ Keep the current store and pass the staged examples directory as the positional argument to `apb-export-web serve`. Stage the managed dataset under its new `zenodo/apb_examples/metamorpheus_ionstar` path and update only the active MetaMorpheus manifest row; preserve previous example directories because completed jobs link to their inputs. Restart only while the local worker is idle, then create a new report from the complete table. No production deployment is performed.
@@ -0,0 +1,33 @@
1
+ {
2
+ "apb-export": {
3
+ "repository": "https://github.com/anndata-omics-bridge/apb-export.git",
4
+ "commit": "10e1166363259f7746c8d03d9bb4c11947118e0c",
5
+ "locked_commit": "cd4791fabe0108875357f04f51ef38ef6a4e7f26"
6
+ },
7
+ "apb2": {
8
+ "repository": "https://github.com/anndata-omics-bridge/apb2.git",
9
+ "commit": "f77b8b82b99df0743fc09a715415ecdb2b2e7076",
10
+ "locked_commit": "f77b8b82b99df0743fc09a715415ecdb2b2e7076"
11
+ },
12
+ "apb-catalog": {
13
+ "repository": "https://github.com/anndata-omics-bridge/apb-catalog.git",
14
+ "commit": "39af7cc8281a365e31cad84cb2357a449ed652e3",
15
+ "locked_commit": "39af7cc8281a365e31cad84cb2357a449ed652e3"
16
+ },
17
+ "apb-fasta": {
18
+ "repository": "https://github.com/anndata-omics-bridge/apb-fasta.git",
19
+ "commit": "5830b080542ed59ec4e40d7ca65e590c5beafe2e",
20
+ "locked_commit": "5830b080542ed59ec4e40d7ca65e590c5beafe2e"
21
+ },
22
+ "protein-fasta": {
23
+ "repository": "https://github.com/anndata-omics-bridge/protein-fasta.git",
24
+ "commit": "4048b16bcce895ca5d7a774d2ec0c11bb9bd34e2",
25
+ "locked_commit": "4048b16bcce895ca5d7a774d2ec0c11bb9bd34e2"
26
+ },
27
+ "prozor": {
28
+ "repository": "https://github.com/anndata-omics-bridge/prozor.git",
29
+ "commit": "9bc689ac9d38e6b01bdc833994b00cfc9cd9ced3",
30
+ "locked_commit": "ab7c41bdfbbe877d66236c5c33549b7747426ace",
31
+ "selection_note": "The local HEAD is an unpublished README-only commit; its public parent has identical src and pyproject.toml. Do not publish unrelated work."
32
+ }
33
+ }
@@ -0,0 +1,71 @@
1
+ # Web app
2
+
3
+ `apb-export-web` without arguments shows Cyclopts help. `apb-export-web serve` starts the page that converts one vendor result and shows QC before download; `apb-export-web serve --help` lists server options.
4
+
5
+ ## Inputs and outputs
6
+
7
+ - Inputs: a vendor result, an optional parameter file, an optional SDRF or prolfquapp sample table, an optional FASTA
8
+ - Outputs: any target on [APB Export targets](https://anndata-omics-bridge.github.io/apb-export/targets/), or an APB2 result as h5ad/h5mu, Parquet or DuckDB
9
+ - QC: intensity density per sample, CV per feature within each annotation group, detected and missing counts
10
+
11
+ ## pMultiQC / QPX
12
+
13
+ Where the `apb-pmultiqc` application is installed, as in the image and a development checkout, choose this output to convert the upload into an APB result and immediately run it. The PyPI install has no `apb-pmultiqc` until a pMultiQC release carries the fixes it needs; there this output is **QPX** and writes the tables only. Optional sample annotation and FASTA verification run before the report; grouping, organism, FASTA and SDRF are not required. RT is resolved through APB Export's chromatography catalogue, never through web-specific vendor-column mappings.
14
+
15
+ After completion, **Open pMultiQC report** opens the self-contained HTML in a new tab. Downloads include `qpx.zip` (Parquet tables and exporter provenance), `pmultiqc_report.html`, and `pmultiqc.zip` (full report, data tables, logs and installed-source provenance). Only a completed job's listed report is served inline at `api/jobs/{id}/report`; deletion and expiry remove it with the job. Failures and timeouts remain failed jobs with a job log.
16
+
17
+ ## exploreDE
18
+
19
+ Choose **exploreDE** to write one exploreDE file per level the result holds: protein, peptide and precursor. Each is its own download, `<input>_explorede_<level>.h5ad`, and **Open <level> in exploreDE** opens Peter Leary's [exploreDE](https://github.com/fgcz/exploreDE) in a new tab with the file's absolute URL as `?data=`. `serve --explorede-url` sets the app; the default is the public instance `https://shiny-public.fgcz.uzh.ch/app/exploreDE/`. exploreDE downloads the file itself, so the link works only from a server exploreDE can reach and accepts, such as `https://apps-dev.bfabric.org/apb-export/`.
20
+
21
+ ```bash
22
+ uv sync --locked --group dev
23
+ uv run --locked apb-export-web examples build
24
+ uv run --locked apb-export-web serve
25
+ ```
26
+
27
+ Staging requires the selected fixtures to be downloaded through APB Studio already. Start the server with `apb-export-web serve` and stop it with Ctrl-C.
28
+
29
+ `serve` searches the current directory and then its parents for an indexed `build/web-examples`, so starting from a checkout subdirectory loads the same bundle. An explicit positional directory selects another bundle. Startup reads the folder's index and runs no exporter; it refuses a folder without an index, or one indexed with other installed APB commits, before touching the job store.
30
+
31
+ If this app already owns the requested address, `serve` gracefully stops it and waits for the port before starting the replacement. The check verifies the listening socket, process owner and installed app entry point; an unrelated or unverifiable listener is left running, and startup exits before changing the job store.
32
+
33
+ The page asks for the software first, then shows the files it expects: result and parameter file names from each tool's own documentation and source code, packaged as `src/apb_export_ui/web/hints.json`, and whether the parameter file is required.
34
+
35
+ A greyed-out output or example button says why in text beside it, such as "Perseus reads protein; this example holds peptidoform_ion.", so touch screens show it too.
36
+
37
+ On desktop, Software, Files and Convert share the left column and Output fills the right. Convert opens a separate results view with a short summary, progress, downloads and a full-width result with two tabs: Quality control first, then AnnData structure. The structure tab draws each H5AD or H5MU result's slots (X, layers, obs, var, the aligned slots and `uns`) from the APB sidecar beside it, `<result>.apb.json`; a result without one, such as a table export, Parquet or DuckDB, has no structure tab. Edit setup preserves the selected files and options; View conversion returns to the current job. Reloading a job URL reopens its results.
38
+
39
+ ## Examples
40
+
41
+ `apb-export-web examples build` resolves the packaged [web selection](https://github.com/anndata-omics-bridge/apb-export-ui/blob/main/src/apb_export_ui/web/example_data/datasets.csv) through the Fixture Manager's `downloads.csv` and writes a staged manifest under `build/web-examples`, then indexes it: `options.json`, `examples.json` and `previews/`. `apb-export-web examples index DIRECTORY` rewrites the index alone, for a staged folder or an empty one. MaxQuant offers two complete folders, FGCZ MaxQuant 2.0.1.0 searches of the ProteoBench Q Exactive and Astral DDA samples, each with evidence, modification-specific peptides, peptides, protein groups and `mqpar.xml`; peptide-entrapment datasets are excluded. `apb-export-web serve` reads that bundle automatically; the optional positional directory overrides its location.
42
+
43
+ `examples build [DIRECTORY] [WORKSPACE]` accepts optional positional destination and workspace roots; the defaults are `build/web-examples` and `..`. The builder ships its supplementary example metadata and annotations with the Python package.
44
+
45
+ Both MaxQuant folders use their ProteoBench module's SDRF, whose data files match the raw runs; each raw file is its own MaxQuant experiment, so the same annotation serves every level. Choose **+ parameters + annotation** to compute CV within conditions A and B. The selection's optional `sdrf` field names a CSV-relative annotation; staging puts it inside a folder input or beside a file input.
46
+
47
+ Examples can run four ways; an example with a parameter file offers the first three, one without it the first and last:
48
+
49
+ - Result file only
50
+ - With its parameter file
51
+ - With parameters and sample annotation
52
+ - With sample annotation alone
53
+
54
+ **+ FASTA** adds the example's FASTA to any of them, where the example has one.
55
+
56
+ The server uses the sample annotation beside the input, or the module annotation staged with the examples. It links the chosen files into the job instead of uploading them; the data stays where the corpus keeps it.
57
+
58
+ The index holds the first 20 lines of every example file, and the page shows them when a file name is clicked.
59
+
60
+ ## Jobs
61
+
62
+ - Each upload becomes a job folder
63
+ - One worker runs the installed conversion and report commands in its own process group
64
+ - The worker writes `status.json`, `qc.json` and the downloads; the server only serves them
65
+ - Finished jobs are deleted after `--ttl-hours`
66
+
67
+ The page is a Lit/Vite project in `web/`; `make web` rebuilds its bundle into `src/apb_export_ui/web/static`, which the wheel ships, so no Node runs in production.
68
+
69
+ ## Deploy
70
+
71
+ Releasing the image, staging the examples and running the container: [Deployment](deploy.md).