pase-framework 1.0.0__tar.gz → 1.1.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.
- {pase_framework-1.0.0 → pase_framework-1.1.0}/.github/workflows/tests.yml +2 -1
- pase_framework-1.1.0/CHANGELOG.md +21 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/CITATION.cff +1 -1
- {pase_framework-1.0.0 → pase_framework-1.1.0}/MANIFEST.in +2 -2
- {pase_framework-1.0.0 → pase_framework-1.1.0}/PKG-INFO +38 -18
- {pase_framework-1.0.0 → pase_framework-1.1.0}/README.md +36 -17
- pase_framework-1.1.0/docs/api.rst +9 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/docs/index.md +1 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/docs/outputs.md +25 -0
- pase_framework-1.1.0/docs/quickstart.md +63 -0
- pase_framework-1.1.0/docs/release.md +83 -0
- pase_framework-1.1.0/docs/reporting-policy.md +84 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/docs/reproducibility.md +12 -2
- {pase_framework-1.0.0 → pase_framework-1.1.0}/docs/statistics.md +17 -14
- pase_framework-1.1.0/examples/gse234933_quickstart.ipynb +267 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/pyproject.toml +2 -1
- pase_framework-1.1.0/scripts/check_docs.py +47 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/scripts/prepare_bioconda.py +1 -1
- {pase_framework-1.0.0 → pase_framework-1.1.0}/src/pase/__init__.py +1 -1
- pase_framework-1.1.0/src/pase/_reporting.py +209 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/src/pase/association.py +43 -5
- {pase_framework-1.0.0 → pase_framework-1.1.0}/src/pase/result.py +26 -6
- {pase_framework-1.0.0 → pase_framework-1.1.0}/src/pase_framework.egg-info/PKG-INFO +38 -18
- {pase_framework-1.0.0 → pase_framework-1.1.0}/src/pase_framework.egg-info/SOURCES.txt +7 -2
- {pase_framework-1.0.0 → pase_framework-1.1.0}/tests/test_association.py +6 -6
- pase_framework-1.1.0/tests/test_reporting.py +244 -0
- pase_framework-1.0.0/docs/api.md +0 -12
- pase_framework-1.0.0/docs/quickstart.md +0 -37
- pase_framework-1.0.0/docs/release.md +0 -74
- pase_framework-1.0.0/examples/gse234933_quickstart.ipynb +0 -269
- {pase_framework-1.0.0 → pase_framework-1.1.0}/.github/workflows/publish.yml +0 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/.readthedocs.yaml +0 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/LICENSE +0 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/THIRD_PARTY_DATA.md +0 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/docs/conf.py +0 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/docs/inputs.md +0 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/examples/build_gse234933_subset.py +0 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/scripts/run_tutorial.py +0 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/setup.cfg +0 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/src/pase/_statistics.py +0 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/src/pase/data/DATA_NOTICE.md +0 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/src/pase/data/gse234933_demo.npz +0 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/src/pase/data/gse234933_demo_manifest.json +0 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/src/pase/data/gse234933_demo_obs.tsv +0 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/src/pase/datasets.py +0 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/src/pase_framework.egg-info/dependency_links.txt +0 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/src/pase_framework.egg-info/requires.txt +0 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/src/pase_framework.egg-info/top_level.txt +0 -0
- {pase_framework-1.0.0 → pase_framework-1.1.0}/tests/test_datasets.py +0 -0
|
@@ -12,7 +12,7 @@ jobs:
|
|
|
12
12
|
strategy:
|
|
13
13
|
fail-fast: false
|
|
14
14
|
matrix:
|
|
15
|
-
os: [ubuntu-latest, macos-
|
|
15
|
+
os: [ubuntu-latest, macos-15-intel, windows-latest]
|
|
16
16
|
python: ['3.10', '3.13']
|
|
17
17
|
runs-on: ${{ matrix.os }}
|
|
18
18
|
defaults:
|
|
@@ -46,6 +46,7 @@ jobs:
|
|
|
46
46
|
python-version: '3.12'
|
|
47
47
|
- run: python -m pip install '.[docs,tutorial]'
|
|
48
48
|
- run: python -m sphinx -W --keep-going -b html docs docs/_build/html
|
|
49
|
+
- run: python scripts/check_docs.py docs/_build/html
|
|
49
50
|
- run: python scripts/run_tutorial.py --output tutorial-output
|
|
50
51
|
- uses: actions/upload-artifact@v4
|
|
51
52
|
if: always()
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
- Changed the default reporting floor from two to six method-eligible patients.
|
|
6
|
+
Explicit lower values remain possible and are flagged. This is a reporting
|
|
7
|
+
policy change, not a change to the equal-r, REML–HKSJ or EB estimators.
|
|
8
|
+
- Preserved descriptive patient effects, exclusions and direction counts when
|
|
9
|
+
inference is withheld. Added machine-readable reporting and warning fields.
|
|
10
|
+
- Added warnings for fewer than twenty eligible patients and for intervals
|
|
11
|
+
wider than a configurable correlation-scale tolerance (default 0.2).
|
|
12
|
+
- Added an equal-r, two-sided noncentral-t planning MDE using an external SD;
|
|
13
|
+
Fisher and EB targets do not inherit that planning model.
|
|
14
|
+
- Documented the simulation evidence, its result-informed timing and limits.
|
|
15
|
+
No patient-count boundary is presented as a calibration guarantee.
|
|
16
|
+
|
|
17
|
+
## 1.0.0
|
|
18
|
+
|
|
19
|
+
Initial public software release with an AnnData interface, patient-level
|
|
20
|
+
association calculations, equal-r, REML–HKSJ and individual EB summaries,
|
|
21
|
+
a real-data tutorial and cross-platform tests.
|
|
@@ -2,7 +2,7 @@ cff-version: 1.2.0
|
|
|
2
2
|
message: "Please cite this software and the version-specific release URL or DOI accompanying the version used."
|
|
3
3
|
type: software
|
|
4
4
|
title: "PASE: patient-level association estimation"
|
|
5
|
-
version: 1.
|
|
5
|
+
version: 1.1.0
|
|
6
6
|
repository-code: "https://github.com/tjw0613-cell/pase-software"
|
|
7
7
|
authors:
|
|
8
8
|
- family-names: Tang
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
include LICENSE README.md CITATION.cff THIRD_PARTY_DATA.md
|
|
1
|
+
include LICENSE README.md CITATION.cff THIRD_PARTY_DATA.md CHANGELOG.md
|
|
2
2
|
include .readthedocs.yaml
|
|
3
3
|
recursive-include src/pase/data *
|
|
4
|
-
recursive-include docs *.md *.py
|
|
4
|
+
recursive-include docs *.md *.rst *.py
|
|
5
5
|
recursive-include examples *.ipynb *.py
|
|
6
6
|
recursive-include tests *.py
|
|
7
7
|
recursive-include scripts *.py
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pase-framework
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Patient-level association estimates for multi-patient single-cell studies
|
|
5
5
|
Author: Jinwei Tang, Yunfan Lin, Linrui Cai, Yali Wen, Guangyang Chen, Li Huang
|
|
6
6
|
License-Expression: MIT
|
|
7
|
+
Project-URL: Documentation, https://pase-software.readthedocs.io/en/latest/
|
|
7
8
|
Project-URL: Source, https://github.com/tjw0613-cell/pase-software
|
|
8
9
|
Project-URL: Issues, https://github.com/tjw0613-cell/pase-software/issues
|
|
9
10
|
Project-URL: Reproduction, https://github.com/tjw0613-cell/pase-reproducibility
|
|
@@ -46,23 +47,27 @@ Dynamic: license-file
|
|
|
46
47
|
|
|
47
48
|
PASE estimates molecular associations within individual patients and summarizes them across a single-cell cohort.
|
|
48
49
|
|
|
50
|
+
Read the [online documentation](https://pase-software.readthedocs.io/en/latest/)
|
|
51
|
+
for installation, the API and the statistical meaning of each parameter.
|
|
52
|
+
|
|
49
53
|
## Installation
|
|
50
54
|
|
|
51
|
-
Use Python 3.10 or later in a fresh environment.
|
|
55
|
+
Use Python 3.10 or later in a fresh environment. Install the published release
|
|
56
|
+
from [PyPI](https://pypi.org/project/pase-framework/1.1.0/):
|
|
52
57
|
|
|
53
58
|
```bash
|
|
54
|
-
git clone https://github.com/tjw0613-cell/pase-software.git
|
|
55
|
-
cd pase-software
|
|
56
59
|
python -m venv .venv
|
|
57
60
|
# Windows: .venv\Scripts\activate
|
|
58
61
|
# macOS/Linux: source .venv/bin/activate
|
|
59
|
-
python -m pip install .
|
|
62
|
+
python -m pip install pase-framework==1.1.0
|
|
60
63
|
```
|
|
61
64
|
|
|
62
65
|
The distribution is named **pase-framework**, but the Python import is `pase`.
|
|
63
66
|
The unrelated audio package named `pase` on PyPI uses the same import name;
|
|
64
|
-
do not install both in one environment.
|
|
65
|
-
|
|
67
|
+
do not install both in one environment. The
|
|
68
|
+
[v1.1.0 release](https://github.com/tjw0613-cell/pase-software/releases/tag/v1.1.0)
|
|
69
|
+
is also available on GitHub. For development, clone this repository and use
|
|
70
|
+
`python -m pip install -e ".[test]"`.
|
|
66
71
|
|
|
67
72
|
## Five-line example
|
|
68
73
|
|
|
@@ -78,8 +83,10 @@ The bundled GSE234933 subset contains real cells and works without a download.
|
|
|
78
83
|
The four-gene target above illustrates the interface; it is not the current
|
|
79
84
|
manuscript's published 15-gene signature. The complete tutorial is
|
|
80
85
|
[examples/gse234933_quickstart.ipynb](examples/gse234933_quickstart.ipynb).
|
|
81
|
-
Install the notebook tools with
|
|
82
|
-
`
|
|
86
|
+
Install the notebook tools with
|
|
87
|
+
`python -m pip install "pase-framework[tutorial]==1.1.0"`. Download the notebook
|
|
88
|
+
or clone this repository, then run
|
|
89
|
+
`jupyter lab examples/gse234933_quickstart.ipynb` from the checkout.
|
|
83
90
|
|
|
84
91
|
## Input format
|
|
85
92
|
|
|
@@ -116,20 +123,33 @@ warnings. `res.plot_forest()` returns a Matplotlib Axes.
|
|
|
116
123
|
| `"re_hksj"` | REML random-effects mean on the Fisher-z scale, back-transformed for display, with a classical HKSJ interval. It has a different target from the arithmetic mean. |
|
|
117
124
|
| `"eb"` | Individual patient effects shrunk toward the fitted Fisher-z population mean. Conditional intervals exclude uncertainty in fitted population parameters; no cohort P value is returned. |
|
|
118
125
|
|
|
119
|
-
`min_cells=30` is adjustable.
|
|
120
|
-
|
|
121
|
-
threshold
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
126
|
+
`min_cells=30` is adjustable. Version 1.1.0 changes the default
|
|
127
|
+
`min_patients` from 2 to **6**. Below the selected method's eligible-patient
|
|
128
|
+
threshold, PASE returns observed patient correlations, descriptive summaries
|
|
129
|
+
and exclusion reasons, but withholds inferential estimates, intervals and
|
|
130
|
+
P values. An explicit lower threshold is allowed and recorded as an override.
|
|
131
|
+
|
|
132
|
+
Reported inference receives a small-cohort warning below 20 eligible patients
|
|
133
|
+
and a precision warning when the full correlation-scale interval is wider
|
|
134
|
+
than `max_ci_width=0.2`. Warnings retain the interval. The patient boundaries
|
|
135
|
+
are result-informed reporting choices, and 0.2 is a configurable practical
|
|
136
|
+
tolerance; none guarantees calibrated coverage. See the
|
|
137
|
+
[reporting policy and its evidence](docs/reporting-policy.md).
|
|
138
|
+
|
|
139
|
+
For the equal-patient mean, an externally specified `planning_sd` enables a
|
|
140
|
+
model-based minimum detectable effect (MDE). Record its origin with
|
|
141
|
+
`planning_sd_source`; set `minimum_relevant_effect` to compare the MDE with a
|
|
142
|
+
scientifically meaningful effect. This is a planning calculation, not achieved
|
|
143
|
+
power, and is not provided for Fisher or EB targets.
|
|
125
144
|
|
|
126
145
|
## Citation
|
|
127
146
|
|
|
128
|
-
For this code, cite the authors, PASE software version **1.
|
|
129
|
-
URL
|
|
147
|
+
For this code, cite the authors, PASE software version **1.1.0**, and its
|
|
148
|
+
[release URL](https://github.com/tjw0613-cell/pase-software/releases/tag/v1.1.0).
|
|
149
|
+
Machine-readable author
|
|
130
150
|
information is in [CITATION.cff](CITATION.cff). An earlier analysis archive is
|
|
131
151
|
available at [Zenodo v3](https://doi.org/10.5281/zenodo.23032874); that DOI does
|
|
132
|
-
not identify this 1.
|
|
152
|
+
not identify this 1.1.0 software release.
|
|
133
153
|
|
|
134
154
|
Code is distributed under the MIT License. The real-data example retains its
|
|
135
155
|
source attribution and third-party terms; see [THIRD_PARTY_DATA.md](THIRD_PARTY_DATA.md).
|
|
@@ -2,23 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
PASE estimates molecular associations within individual patients and summarizes them across a single-cell cohort.
|
|
4
4
|
|
|
5
|
+
Read the [online documentation](https://pase-software.readthedocs.io/en/latest/)
|
|
6
|
+
for installation, the API and the statistical meaning of each parameter.
|
|
7
|
+
|
|
5
8
|
## Installation
|
|
6
9
|
|
|
7
|
-
Use Python 3.10 or later in a fresh environment.
|
|
10
|
+
Use Python 3.10 or later in a fresh environment. Install the published release
|
|
11
|
+
from [PyPI](https://pypi.org/project/pase-framework/1.1.0/):
|
|
8
12
|
|
|
9
13
|
```bash
|
|
10
|
-
git clone https://github.com/tjw0613-cell/pase-software.git
|
|
11
|
-
cd pase-software
|
|
12
14
|
python -m venv .venv
|
|
13
15
|
# Windows: .venv\Scripts\activate
|
|
14
16
|
# macOS/Linux: source .venv/bin/activate
|
|
15
|
-
python -m pip install .
|
|
17
|
+
python -m pip install pase-framework==1.1.0
|
|
16
18
|
```
|
|
17
19
|
|
|
18
20
|
The distribution is named **pase-framework**, but the Python import is `pase`.
|
|
19
21
|
The unrelated audio package named `pase` on PyPI uses the same import name;
|
|
20
|
-
do not install both in one environment.
|
|
21
|
-
|
|
22
|
+
do not install both in one environment. The
|
|
23
|
+
[v1.1.0 release](https://github.com/tjw0613-cell/pase-software/releases/tag/v1.1.0)
|
|
24
|
+
is also available on GitHub. For development, clone this repository and use
|
|
25
|
+
`python -m pip install -e ".[test]"`.
|
|
22
26
|
|
|
23
27
|
## Five-line example
|
|
24
28
|
|
|
@@ -34,8 +38,10 @@ The bundled GSE234933 subset contains real cells and works without a download.
|
|
|
34
38
|
The four-gene target above illustrates the interface; it is not the current
|
|
35
39
|
manuscript's published 15-gene signature. The complete tutorial is
|
|
36
40
|
[examples/gse234933_quickstart.ipynb](examples/gse234933_quickstart.ipynb).
|
|
37
|
-
Install the notebook tools with
|
|
38
|
-
`
|
|
41
|
+
Install the notebook tools with
|
|
42
|
+
`python -m pip install "pase-framework[tutorial]==1.1.0"`. Download the notebook
|
|
43
|
+
or clone this repository, then run
|
|
44
|
+
`jupyter lab examples/gse234933_quickstart.ipynb` from the checkout.
|
|
39
45
|
|
|
40
46
|
## Input format
|
|
41
47
|
|
|
@@ -72,20 +78,33 @@ warnings. `res.plot_forest()` returns a Matplotlib Axes.
|
|
|
72
78
|
| `"re_hksj"` | REML random-effects mean on the Fisher-z scale, back-transformed for display, with a classical HKSJ interval. It has a different target from the arithmetic mean. |
|
|
73
79
|
| `"eb"` | Individual patient effects shrunk toward the fitted Fisher-z population mean. Conditional intervals exclude uncertainty in fitted population parameters; no cohort P value is returned. |
|
|
74
80
|
|
|
75
|
-
`min_cells=30` is adjustable.
|
|
76
|
-
|
|
77
|
-
threshold
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
`min_cells=30` is adjustable. Version 1.1.0 changes the default
|
|
82
|
+
`min_patients` from 2 to **6**. Below the selected method's eligible-patient
|
|
83
|
+
threshold, PASE returns observed patient correlations, descriptive summaries
|
|
84
|
+
and exclusion reasons, but withholds inferential estimates, intervals and
|
|
85
|
+
P values. An explicit lower threshold is allowed and recorded as an override.
|
|
86
|
+
|
|
87
|
+
Reported inference receives a small-cohort warning below 20 eligible patients
|
|
88
|
+
and a precision warning when the full correlation-scale interval is wider
|
|
89
|
+
than `max_ci_width=0.2`. Warnings retain the interval. The patient boundaries
|
|
90
|
+
are result-informed reporting choices, and 0.2 is a configurable practical
|
|
91
|
+
tolerance; none guarantees calibrated coverage. See the
|
|
92
|
+
[reporting policy and its evidence](docs/reporting-policy.md).
|
|
93
|
+
|
|
94
|
+
For the equal-patient mean, an externally specified `planning_sd` enables a
|
|
95
|
+
model-based minimum detectable effect (MDE). Record its origin with
|
|
96
|
+
`planning_sd_source`; set `minimum_relevant_effect` to compare the MDE with a
|
|
97
|
+
scientifically meaningful effect. This is a planning calculation, not achieved
|
|
98
|
+
power, and is not provided for Fisher or EB targets.
|
|
81
99
|
|
|
82
100
|
## Citation
|
|
83
101
|
|
|
84
|
-
For this code, cite the authors, PASE software version **1.
|
|
85
|
-
URL
|
|
102
|
+
For this code, cite the authors, PASE software version **1.1.0**, and its
|
|
103
|
+
[release URL](https://github.com/tjw0613-cell/pase-software/releases/tag/v1.1.0).
|
|
104
|
+
Machine-readable author
|
|
86
105
|
information is in [CITATION.cff](CITATION.cff). An earlier analysis archive is
|
|
87
106
|
available at [Zenodo v3](https://doi.org/10.5281/zenodo.23032874); that DOI does
|
|
88
|
-
not identify this 1.
|
|
107
|
+
not identify this 1.1.0 software release.
|
|
89
108
|
|
|
90
109
|
Code is distributed under the MIT License. The real-data example retains its
|
|
91
110
|
source attribution and third-party terms; see [THIRD_PARTY_DATA.md](THIRD_PARTY_DATA.md).
|
|
@@ -15,12 +15,37 @@
|
|
|
15
15
|
| `df` | Degrees of freedom used by the interval. |
|
|
16
16
|
| `tau2` | Estimated between-patient variance on the Fisher-z scale; not applicable to equal-r summaries. |
|
|
17
17
|
| `status`, `reason` | Whether inference was returned and why it was withheld. |
|
|
18
|
+
| `reporting_status`, `inference_available` | Descriptive, cohort-inferential or individual-EB reporting; availability refers only to cohort inference. |
|
|
19
|
+
| `descriptive_mean_r`, `descriptive_median_r` | Unshrunk correlations among patients eligible for the selected method, even when inference is withheld. |
|
|
20
|
+
| `n_positive`, `n_negative`, `n_zero` | Direction counts in that same eligible set. All other observed correlations remain in the patient table. |
|
|
21
|
+
| `warning_codes` | Machine-readable cautions; the complete explanations are in `metadata["warnings"]`. |
|
|
22
|
+
| `ci_width` | Full displayed correlation-scale cohort interval width; NaN if no cohort interval is returned. |
|
|
23
|
+
| `planning_mde`, `mde_status`, `mde_attainable` | External-SD equal-r planning calculation, its availability, and whether its magnitude is at most one. This is not achieved power or a full bounded-distribution feasibility check. |
|
|
18
24
|
|
|
19
25
|
Status `reported` denotes a computed interval, not demonstrated reliability.
|
|
20
26
|
`withheld_policy` means the selected patient threshold was not met.
|
|
21
27
|
`withheld_technical` means an interval was not mathematically estimable.
|
|
22
28
|
`individual_estimates_only` marks EB mode.
|
|
23
29
|
|
|
30
|
+
`reporting_status` uses `descriptive_only`, `inferential`,
|
|
31
|
+
`inferential_with_warnings`, `individual_estimates_only` or
|
|
32
|
+
`individual_estimates_with_warnings`. Even `inferential` does not certify
|
|
33
|
+
calibration; `metadata["calibration_guaranteed"]` is always false.
|
|
34
|
+
|
|
35
|
+
MDE status is `not_requested`, `withheld_policy`, `not_supported`,
|
|
36
|
+
`numerical_failure` or `model_based_planning`. A planning result can be
|
|
37
|
+
available with `inference_available=False` when the external planning inputs
|
|
38
|
+
are usable but the observed-data interval is technically undefined.
|
|
39
|
+
|
|
40
|
+
The principal warning codes are `below_min_patients`,
|
|
41
|
+
`below_default_min_patients`, `small_cohort_calibration_warning`,
|
|
42
|
+
`wide_interval`, `weighted_aggregation_assumptions`,
|
|
43
|
+
`fisher_variance_approximation`, `eb_conditional_uncertainty`,
|
|
44
|
+
`inference_unavailable`, `planning_sd_source_unspecified`,
|
|
45
|
+
`model_based_power_warning`, `mde_exceeds_correlation_range`,
|
|
46
|
+
`mde_not_supported` and `mde_numerical_failure`.
|
|
47
|
+
See [Reporting policy](reporting-policy.md) for their scope.
|
|
48
|
+
|
|
24
49
|
## Patient table
|
|
25
50
|
|
|
26
51
|
`result.patients` includes all patients, including those with no selected cells.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Quick start
|
|
2
|
+
|
|
3
|
+
Create and activate an environment, then install the published PASE release:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
python -m venv .venv
|
|
7
|
+
# Windows: .venv\Scripts\activate
|
|
8
|
+
# macOS/Linux: source .venv/bin/activate
|
|
9
|
+
python -m pip install "pase-framework[tutorial]==1.1.0"
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The package distribution is `pase-framework`; the Python module is `pase`.
|
|
13
|
+
Use a fresh environment to avoid the unrelated `pase` audio package.
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
import pase
|
|
17
|
+
adata = pase.datasets.load_gse234933_demo()
|
|
18
|
+
result = pase.associate(
|
|
19
|
+
adata, anchor="LILRB4", target=["MMP14", "MMP9", "SPP1", "APOE"],
|
|
20
|
+
patient_key="donor", covariates=["log_depth"], cell_mask="myeloid",
|
|
21
|
+
aggregate="equal", min_cells=30,
|
|
22
|
+
)
|
|
23
|
+
print(result.summary().to_string(index=False))
|
|
24
|
+
print(result.patients[["patient_id", "n_cells", "r", "eligible", "reason"]])
|
|
25
|
+
ax = result.plot_forest()
|
|
26
|
+
ax.figure.savefig("association.pdf", bbox_inches="tight")
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
This is an interface example using real cells, not a full-cohort analysis.
|
|
30
|
+
The four-gene target demonstrates module input; the revised manuscript's main
|
|
31
|
+
biological analysis uses a separately sourced 15-gene signature.
|
|
32
|
+
|
|
33
|
+
Download [the tutorial notebook](https://github.com/tjw0613-cell/pase-software/blob/v1.1.0/examples/gse234933_quickstart.ipynb)
|
|
34
|
+
or clone the software repository. Open `examples/gse234933_quickstart.ipynb`
|
|
35
|
+
with JupyterLab for a complete
|
|
36
|
+
walkthrough of normalization metadata, exclusions, the three summaries,
|
|
37
|
+
threshold sensitivity and saving results. After installation, that notebook
|
|
38
|
+
needs neither network access nor a separate raw-data download.
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Inspect reporting warnings
|
|
42
|
+
|
|
43
|
+
The teaching subset has eight donors. Its small-cohort warning is expected.
|
|
44
|
+
Check `result.metadata["warnings"]` and the eligible patient count rather than
|
|
45
|
+
treating a computed interval as proof of reliability. The default reporting
|
|
46
|
+
floor is six eligible patients; the warning boundary is twenty.
|
|
47
|
+
|
|
48
|
+
For an externally specified planning scenario, use:
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
planned = pase.associate(
|
|
52
|
+
adata, anchor="LILRB4", target=["MMP14", "MMP9", "SPP1", "APOE"],
|
|
53
|
+
patient_key="donor", covariates=["log_depth"], cell_mask="myeloid",
|
|
54
|
+
aggregate="equal", planning_sd=0.15,
|
|
55
|
+
planning_sd_source="Illustrative planning assumption, not an empirical estimate",
|
|
56
|
+
minimum_relevant_effect=0.10, planning_power=0.80,
|
|
57
|
+
)
|
|
58
|
+
print(planned.summary())
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The SD and effect above are illustrative user choices, not values established
|
|
62
|
+
for this biological association. Replace them with justified study-specific
|
|
63
|
+
planning values. Do not use an observed effect as the minimum relevant effect.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Maintainer release instructions
|
|
2
|
+
|
|
3
|
+
## Release records
|
|
4
|
+
|
|
5
|
+
Version 1.1.0 changes reporting defaults and adds precision warnings and a
|
|
6
|
+
model-based planning MDE. See [the changelog](https://github.com/tjw0613-cell/pase-software/blob/v1.1.0/CHANGELOG.md)
|
|
7
|
+
and [reporting policy](reporting-policy.md) before upgrading an existing workflow.
|
|
8
|
+
Release artifacts are indexed on [PyPI](https://pypi.org/project/pase-framework/1.1.0/)
|
|
9
|
+
and [GitHub](https://github.com/tjw0613-cell/pase-software/releases/tag/v1.1.0).
|
|
10
|
+
Check the actual [release workflow results](https://github.com/tjw0613-cell/pase-software/actions/workflows/publish.yml)
|
|
11
|
+
for cross-platform tests and upload status; the configuration alone is not proof
|
|
12
|
+
that a run passed.
|
|
13
|
+
|
|
14
|
+
The software repository is `tjw0613-cell/pase-software`; the manuscript
|
|
15
|
+
repository is `tjw0613-cell/pase-reproducibility`. A Bioconda package has not
|
|
16
|
+
been published. The earlier manuscript archive DOI and the simulation protocol
|
|
17
|
+
DOI do not identify this software version. Never commit API tokens or move an
|
|
18
|
+
existing published release tag.
|
|
19
|
+
|
|
20
|
+
## Build and check
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
python -m pip install '.[test,docs,tutorial,build]'
|
|
24
|
+
python -m pytest
|
|
25
|
+
python scripts/run_tutorial.py
|
|
26
|
+
python -m sphinx -W --keep-going -b html docs docs/_build/html
|
|
27
|
+
python -m build
|
|
28
|
+
python -m twine check dist/*
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Inspect the actual GitHub Actions results on Linux, macOS and Windows. Fix
|
|
32
|
+
failures before tagging a release. For a future version, update both package
|
|
33
|
+
metadata and `pase.__version__`, then use the matching GitHub version tag.
|
|
34
|
+
Do not move the published `v1.0.0` tag or replace its distributions.
|
|
35
|
+
|
|
36
|
+
## PyPI
|
|
37
|
+
|
|
38
|
+
The published distribution name is **pase-framework**. `pase` is used by an
|
|
39
|
+
unrelated project and must not be substituted in installation commands.
|
|
40
|
+
|
|
41
|
+
The production Trusted Publisher uses GitHub owner `tjw0613-cell`, repository
|
|
42
|
+
`pase-software`, workflow `publish.yml` and environment `pypi`. For TestPyPI,
|
|
43
|
+
configure a separate publisher with environment `testpypi` before using the
|
|
44
|
+
manual testing workflow.
|
|
45
|
+
|
|
46
|
+
The manual **Publish release** workflow uploads to TestPyPI. A **published
|
|
47
|
+
GitHub release** triggers the same tests and then uploads to PyPI. The publisher
|
|
48
|
+
uses OIDC, not a password stored in the repository. After public upload,
|
|
49
|
+
verify the project page, download the published distribution and repeat the
|
|
50
|
+
five-line example in a fresh environment using:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
python -m pip install pase-framework==1.1.0
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Repeat the clean installation check for each future version before updating
|
|
57
|
+
its installation instructions. See the official
|
|
58
|
+
[Trusted Publisher guide](https://docs.pypi.org/trusted-publishers/using-a-publisher/).
|
|
59
|
+
|
|
60
|
+
## Read the Docs
|
|
61
|
+
|
|
62
|
+
The project is [pase-software](https://app.readthedocs.org/projects/pase-software/).
|
|
63
|
+
Its public documentation is available at
|
|
64
|
+
https://pase-software.readthedocs.io/en/latest/.
|
|
65
|
+
The root `.readthedocs.yaml` selects Python, installs the documentation extra
|
|
66
|
+
and builds Sphinx with warnings treated as errors. The initial successful
|
|
67
|
+
build was [35689123](https://app.readthedocs.org/projects/pase-software/builds/35689123/),
|
|
68
|
+
from commit `f15b4ad5748de1279d0b5b640f07b1db4f51a530`.
|
|
69
|
+
The `latest` documentation follows `main`; it is not an immutable version archive.
|
|
70
|
+
For future tagged documentation, activate the tag and verify its own public URL
|
|
71
|
+
after a successful build. Do not move an existing release tag.
|
|
72
|
+
See the [configuration reference](https://docs.readthedocs.com/platform/stable/config-file/v2.html).
|
|
73
|
+
|
|
74
|
+
## Bioconda
|
|
75
|
+
|
|
76
|
+
After the PyPI source distribution is public, run
|
|
77
|
+
`python scripts/prepare_bioconda.py --source-url URL --maintainer GITHUB_NAME --homepage REPOSITORY_URL`.
|
|
78
|
+
The script downloads the exact source artifact, verifies its package/version,
|
|
79
|
+
and writes a recipe with its SHA-256. Supply a maintainer who has agreed to the
|
|
80
|
+
role. Review and submit the recipe to the Bioconda recipes repository and run
|
|
81
|
+
its required checks. Recipe generation is not a channel publication.
|
|
82
|
+
See [Bioconda contributor guidelines](https://bioconda.github.io/contributor/guidelines.html).
|
|
83
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Reporting policy
|
|
2
|
+
|
|
3
|
+
Version 1.1.0 uses the number of **eligible patients for the selected method**
|
|
4
|
+
to decide what to report. The attempted cohort size cannot satisfy this check.
|
|
5
|
+
These defaults are result-informed reporting choices, not validated guarantees.
|
|
6
|
+
|
|
7
|
+
| Condition | Default behavior |
|
|
8
|
+
|---|---|
|
|
9
|
+
| Fewer than 6 eligible patients | Retain observed patient correlations, exclusion reasons, descriptive mean/median and direction counts. Withhold inferential estimates, intervals and P values, including EB shrinkage intervals. |
|
|
10
|
+
| 6–19 eligible patients | Permit mathematically estimable inference and add a small-cohort warning. |
|
|
11
|
+
| 20 or more eligible patients | Permit mathematically estimable inference; calibration remains conditional on the method and data assumptions. |
|
|
12
|
+
| Full correlation-scale interval width exceeds 0.2 | Retain the interval and add a precision warning. |
|
|
13
|
+
| Planning MDE exceeds the minimum relevant effect | Add a model-based planning-power warning. |
|
|
14
|
+
|
|
15
|
+
`min_patients` is configurable, with a mathematical minimum of two. An explicit
|
|
16
|
+
value below six is flagged as an override. `max_ci_width` sets a practical
|
|
17
|
+
precision tolerance; `None` disables that check. Selecting intervals on their
|
|
18
|
+
observed width would change the reported subset, so a width warning does not
|
|
19
|
+
remove an interval. All results retain `calibration_guaranteed=False` in metadata.
|
|
20
|
+
|
|
21
|
+
## Evidence and timing
|
|
22
|
+
|
|
23
|
+
The completed count simulation contains 293 generating conditions and
|
|
24
|
+
3,302,000 study cohorts. The design and executable protocol were archived
|
|
25
|
+
before those formal runs as [protocol 2.0.0](https://doi.org/10.5281/zenodo.24010816).
|
|
26
|
+
Reporting floors of 2, 4 and 6 were registered illustrative comparisons.
|
|
27
|
+
Selecting six as the software default, adding a warning below twenty, and
|
|
28
|
+
choosing a width tolerance of 0.2 were development decisions made after
|
|
29
|
+
examining the results. They have not undergone independent confirmation.
|
|
30
|
+
|
|
31
|
+
With the primary cell cutoff of 30 and reporting floor of 6, 234 conditions
|
|
32
|
+
produced at least one reported interval. Across those conditions, equal-t
|
|
33
|
+
conditional coverage ranged from 81.76% to 96.78%; REML–HKSJ coverage ranged
|
|
34
|
+
from 71.68% to 96.01%. The method targets differ, so these ranges are not a
|
|
35
|
+
ranking of two estimators of one quantity. A stress condition with forty
|
|
36
|
+
attempted patients still had poor weighted-interval coverage. Increasing the
|
|
37
|
+
patient count cannot by itself certify inference.
|
|
38
|
+
|
|
39
|
+
The audit checked all 13,208 archived interval-shard hashes and reproduced the
|
|
40
|
+
registered floor-2/4/6 counts. This verifies the extraction of the policy
|
|
41
|
+
evidence, not the statistical adequacy of the chosen reporting rules.
|
|
42
|
+
|
|
43
|
+
The formal main workflow used a fixed 15-gene outcome and depth-only
|
|
44
|
+
adjustment. Arbitrary API gene sets, covariates, normalization choices or
|
|
45
|
+
outcome-dependent masks are outside a universal calibration claim. In
|
|
46
|
+
particular, `cell_mask` is applied before within-patient score standardization;
|
|
47
|
+
it does not reproduce the formal outcome gate applied after score construction.
|
|
48
|
+
|
|
49
|
+
## Planning MDE
|
|
50
|
+
|
|
51
|
+
For `aggregate="equal"`, specify an external `planning_sd` on the correlation
|
|
52
|
+
scale and record its origin in `planning_sd_source`. With eligible count
|
|
53
|
+
$J$, PASE solves for the noncentrality parameter $\lambda$ such that
|
|
54
|
+
|
|
55
|
+
$$
|
|
56
|
+
\Pr\bigl(\lvert T_{J-1,\lambda}\rvert > t_{J-1,1-\alpha/2}\bigr)
|
|
57
|
+
= \text{planning_power},\qquad
|
|
58
|
+
\mathrm{MDE}=\lambda\,\text{planning_sd}/\sqrt{J}.
|
|
59
|
+
$$
|
|
60
|
+
|
|
61
|
+
The default planning power is 0.8. `minimum_relevant_effect` is a scientifically
|
|
62
|
+
specified absolute effect against which to compare the MDE; supplying it
|
|
63
|
+
requires a planning SD. PASE cannot verify that a supplied SD came from an
|
|
64
|
+
independent source. If its source is omitted, the output records a warning.
|
|
65
|
+
Do not substitute the current observed effect for the scientific effect of
|
|
66
|
+
interest or label an observed sample SD as independent planning information.
|
|
67
|
+
|
|
68
|
+
The calculation assumes independent normal patient effects and tests a zero
|
|
69
|
+
arithmetic mean. It is not achieved power and is not a guarantee under the
|
|
70
|
+
mixture scenarios that caused undercoverage. An MDE above one is retained
|
|
71
|
+
and flagged as unattainable on the correlation scale. Fisher and EB MDEs
|
|
72
|
+
are not computed by applying the arithmetic-r formula to a different target.
|
|
73
|
+
|
|
74
|
+
Below the reporting floor, the MDE is suppressed. Above that floor, an external
|
|
75
|
+
planning calculation can remain available even if the observed-data interval
|
|
76
|
+
is technically undefined; `inference_available` stays false in that case.
|
|
77
|
+
|
|
78
|
+
## Weighted and individual summaries
|
|
79
|
+
|
|
80
|
+
Fisher-weighted inference always carries a model-assumption caution: its
|
|
81
|
+
variance approximation and relationship between cell yield and effect matter
|
|
82
|
+
even in larger cohorts. EB intervals condition on fitted population parameters
|
|
83
|
+
and are not cohort confidence intervals. No absence of a small-cohort or width
|
|
84
|
+
warning should be read as a declaration that either method is calibrated.
|
|
@@ -34,7 +34,17 @@ raises an error.
|
|
|
34
34
|
|
|
35
35
|
In the separate repository, `python reproduce.py fig2` is a portable equivalent
|
|
36
36
|
of `make fig2`. Each figure command documents whether it recreates a plot from
|
|
37
|
-
archived summary inputs or repeats the upstream analysis.
|
|
38
|
-
|
|
37
|
+
archived summary inputs or repeats the upstream analysis. Figure inputs must match the manuscript revision being reproduced. The
|
|
38
|
+
software release and teaching subset do not bundle the full formal simulation
|
|
39
|
+
archive. A missing input is reported as missing, not replaced by a synthetic chart.
|
|
39
40
|
The bundled notebook does not reproduce all manuscript results.
|
|
40
41
|
|
|
42
|
+
|
|
43
|
+
## Reporting-policy evidence
|
|
44
|
+
|
|
45
|
+
The 1.1.0 policy was developed after examining the completed unified count
|
|
46
|
+
simulation: 293 conditions and 3,302,000 study cohorts. The archived protocol
|
|
47
|
+
is [version 2.0.0](https://doi.org/10.5281/zenodo.24010816). That DOI identifies
|
|
48
|
+
the protocol, not the subsequently generated results or an independent
|
|
49
|
+
validation of the software defaults. See [Reporting policy](reporting-policy.md)
|
|
50
|
+
for the distinction between a reporting choice and a calibrated recommendation.
|
|
@@ -82,17 +82,20 @@ contains no cohort estimate, cohort confidence interval or P value for this mode
|
|
|
82
82
|
|
|
83
83
|
## Reporting policy
|
|
84
84
|
|
|
85
|
-
`min_patients`
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
and
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
85
|
+
The default `min_patients=6` is a reporting floor applied after method-specific
|
|
86
|
+
eligibility checks. Below it, patient correlations and descriptive summaries
|
|
87
|
+
remain available, while inferential quantities are withheld. The result-informed
|
|
88
|
+
policy and its limitations are detailed in [Reporting policy](reporting-policy.md).
|
|
89
|
+
Small-cohort and wide-interval warnings do not remove otherwise computable
|
|
90
|
+
intervals. Passing either check does not establish calibration.
|
|
91
|
+
|
|
92
|
+
For the equal-patient mean only, a supplied external `planning_sd` enables a
|
|
93
|
+
two-sided noncentral-t MDE calculation at the requested `alpha` and
|
|
94
|
+
`planning_power`. This assumes independent normally distributed patient effects
|
|
95
|
+
with the specified planning SD. It does not estimate achieved power from the
|
|
96
|
+
observed effect, guarantee power under mixture distributions, or support the
|
|
97
|
+
Fisher-z or EB target. The API does not provide a prediction interval.
|
|
98
|
+
|
|
99
|
+
The package does not adjust across multiple calls: when testing many
|
|
100
|
+
associations, define the testing family and apply the selected multiplicity
|
|
101
|
+
correction separately.
|