Skip to content

Install

pyHisto is installed, run and developed with pixi only. Pixi builds one reproducible environment per project from its pixi.toml and pixi.lock, so everyone gets exactly the same packages.

Install pixi once (see pixi.sh for Windows and macOS):

curl -fsSL https://pixi.sh/install.sh | bash

Option 1: work inside the pyHisto repository

Use this to try pyHisto, run the tutorial or develop it.

git clone https://github.com/Oxford-Zeiss-Centre-of-Excellence/pyHisto
cd pyHisto
pixi install            # builds the environment, pyHisto itself is editable
pixi run histo --help   # the command-line tool
pixi run test           # the test suite

Every command then runs as pixi run <command>, or start a shell inside the environment with pixi shell.

Option 2: use pyHisto from your own pixi project

Your analysis project has its own pixi.toml; add pyHisto to it as a dependency.

pixi add --pypi pyhisto

A PyPI release is planned; until then use one of the other tabs.

In your pixi.toml:

[pypi-dependencies]
pyhisto = { git = "ssh://git@github.com/Oxford-Zeiss-Centre-of-Excellence/pyHisto.git", branch = "main" }

For developing pyHisto and your project together, for example with pyHisto as a git submodule in dependency/pyHisto:

[pypi-dependencies]
pyhisto = { path = "dependency/pyHisto", editable = true }

Edits to the pyHisto sources take effect without reinstalling.

Then run pixi install in your project.

histomicstk needs extra wheels

pyHisto depends on histomicstk (used by the legacy deconvolution code), whose GDAL/mapnik dependencies come from the large_image wheel index. Add it to your project's pixi.toml once, exactly as pyHisto's own pixi.toml does:

[pypi-options]
index-url = "https://pypi.org/simple"
find-links = [{ url = "https://girder.github.io/large_image_wheels" }]

Check that it works

pixi run python -c "import pyHisto as histo; print(histo.__version__, histo.stain.available_methods())"
1.0.0 ['numpy']

available_methods() lists the stain estimators usable right now. numpy is always there; qupath appears only when a QuPath installation is found (see Use QuPath as the reference).

What you also need

  • tanoa, to convert CZI files into OME-Zarr (a separate Oxford-Zeiss Centre of Excellence tool with its own pixi environment). pyHisto reads OME-Zarr only.
  • Optional: QuPath 0.7.0, only as a reference to compare against.

tanoa is private for now

tanoa's repository is currently private; ask the Oxford-Zeiss Centre of Excellence for access.

Importing pyHisto is light: it loads NumPy only. The heavy legacy modules (pyHisto.io, pyHisto.decon, ...) are imported only when you use them.

Next: Your first calibration