# Installing STDetail

STDetail runs on Python 3.10 or later. The download contains the code and small synthetic examples. It contains no patient data and no model weights. Terms of use are in NOTICE.md.

## Install

```bash
python -m venv .venv
source .venv/bin/activate           # Windows: .venv\Scripts\activate
python -m pip install stdetail-*.whl  # run in the folder with the downloaded wheel
stdetail --help
```

On Windows, type the full file name of the wheel instead of `stdetail-*.whl`.

Install the PyTorch build that matches your CPU or CUDA setup. pip fetches any missing dependencies, so the first install needs network access. If you only need to export results that were already computed, `python -m pip install --no-deps stdetail-*.whl` is enough for `stdetail export-results`. Scoring needs the full dependencies.

To install from the source archive, extract it and run `python -m pip install .` in the extracted folder. The cell workflows need the optional extras: `python -m pip install '.[cell]'`. The source archive also contains the workflow documentation, input specifications, a synthetic data generator and four example bundles in `examples/bundles` that open directly on the website.

## Export completed evaluations

```bash
stdetail export-results --run outputs/hest --output outputs/hest-results.json
stdetail export-results --run outputs/her2 --output outputs/ordering-results.json
stdetail export-results --run outputs/fourier_P1.tsv --unit P1 --run outputs/fourier_P2.tsv --unit P2 --output outputs/physical-results.json
stdetail export-results --run outputs/cell_scores --output outputs/cell-results.json
```

Open the JSON on the website under Analyze data, Computed results. One prediction is enough. Repeating `--run` combines several units without recomputing any score; duplicate result identities stop with an error message. Use `--synthetic` only for generated examples.

For expression maps of a matched HEST prediction pair, use `stdetail export --manifest ... --run ... --output ...`. The general result bundle holds scores and source tables, not expression maps.
