osx-arm64:-conda: .../bioconda/osx-arm64/ samtools-1.24-h36b3a25_2.conda-conda: .../bioconda/osx-arm64/ htslib-1.24-hd3c6ec9_0.conda- ... every dependencypackages:-conda: .../samtools-1.24-h36b3a25_2.condasha256: f8ee1aea15b0b5...
fact: exact files and checksums, every platform
Three commands
Command
Does
pixi add samtools
edits pixi.toml, updates pixi.lock, installs
pixi run samtools ...
runs one command in the project’s environment
pixi install --locked
rebuilds exactly what pixi.lock says, or stops
Delete .pixi/ whenever you like: the lock file brings it back.
Features: building blocks for environments
[dependencies]# default feature: report tools, all platformsquarto=">=1.9"pandas=">=2"[feature.pipeline]# bwa, samtools, bcftools: no Windows buildsplatforms=["linux-64","osx-arm64","osx-64"][feature.pipeline.dependencies]bwa=">=0.7.19,<0.8"samtools=">=1.24,<2"[environments]pipeline=["pipeline"]# = default + pipeline
Tasks: the pipeline in one word
$ pixi run reproduce✨ Pixi task (download in default): python scripts/download_data.py✨ Pixi task (qc in pipeline): fastqc ... &&multiqc ...✨ Pixi task (variant-calling in pipeline): bash scripts/run_variant_calling.sh
Each task runs in the environment that has its tools. The report joins reproduce in lesson 07.
GitHub reruns it on every push
-uses: actions/checkout@v7 # a clean clone-uses: prefix-dev/setup-pixi@v0.11.2with:{locked:true} # both environments, from pixi.lock-run: pixi run reproduce # download, QC, variant calling
The placeholder check from lesson 04 now does real work. Green check = your project rebuilds and reruns on a computer that has never seen it.
If you know Conda
Conda
Pixi
environment.yml (often written by hand)
pixi.toml (written by pixi add)
conda env export > environment.yml (if you remember)
Week 1 slides 57 to 61 (dependency hell, Conda/Bioconda/Mamba/Lmod, Pixi intro) are the opener; the xkcd comic on slide 58 is linked in class, not embedded (non-commercial license).