Installation¶
hicstuff needs Python 3.10 or later, on Linux or macOS. On Windows, use WSL2: pysam, one of its dependencies, publishes no Windows wheels.
From PyPI¶
That alone runs the whole pipeline, from FASTQ files to matrices, in mapping
mode 5spm, the recommended one:
needs no other program: it aligns the mates with bwa mem -5SPM, in-process,
through pybwa, which pip installs
with hicstuff.
Aligners and other programs¶
Mapping mode 5spm, the recommended one, aligns with bwa, through pybwa
unless --aligner-backend binary asks for the bwa program: it needs no
program. See Aligning reads. In the other
mapping modes, --aligner chooses the aligner that maps the reads:
| Aligner | How hicstuff runs it | To install |
|---|---|---|
bowtie2 (the default) |
The bowtie2 program |
Not on PyPI: apt-get install bowtie2, conda install -c bioconda bowtie2 or brew install bowtie2 |
bwa |
The bwa program if it is on PATH, otherwise in-process through pybwa. --aligner-backend (or HICSTUFF_ALIGNER_BACKEND) chooses |
Nothing: pybwa comes with hicstuff |
minimap2 |
The minimap2 program |
Not on PyPI: apt-get install minimap2, conda or brew |
hicstuff iteralign and hicstuff missview always run the aligner, and
hicstuff pipeline only to start from FASTQ files: --start-stage bam,
pairs or pairs_idx needs no aligner, except bowtie2-inspect (part of
bowtie2) when the genome is given as a bowtie2 index. hicstuff reads the
sequence of a bwa index itself.
No other program is needed. Two are used when they are installed:
bgzip(from htslib) compresses the final pairs file on several threads, in the BGZF format, which pairix can index. Without it, pysam compresses it on one thread.- GNU, BSD or uutils
sortsorts the pairs. Without one, they are sorted in Python on one thread (busyboxsortlacks the options hicstuff needs). SetHICSTUFF_SORT=pythonto always sort them in Python.
samtools is not needed: hicstuff runs the samtools that pysam bundles. On
Debian or Ubuntu (the tabix package provides bgzip):
Platforms that need a compiler¶
pip installs wheels where they exist, and builds the other dependencies from source, which needs a C compiler, make and the zlib headers. As of November 2026:
- macOS with Python 3.14: pybwa publishes no wheel for it yet. Install
Xcode's command-line tools (
xcode-select --install), or use Python 3.13. - macOS on Intel: biopython has published no Intel wheel since 1.87.
pip install --prefer-binary hicstuffinstalls the last version that has one. - Linux with an older glibc, such as RHEL or CentOS 7: several dependencies, pybwa and pysam among them, publish no wheel for it. Building pysam also needs the bzip2 and xz (lzma) headers. Conda is easier there.
- Alpine and other musl-based Linux: biopython, and matplotlib on aarch64, publish no musl wheels.
With conda¶
hicstuff is also on bioconda. To install it with the aligners and bgzip:
With Docker¶
Docker images, with hicstuff, bowtie2, bwa, minimap2 and htslib, are built and published to the GitHub Container Registry when a release is tagged:
Development version¶
uv sync --extra docs adds what builds this documentation; see
Contributing.
Licence¶
hicstuff is distributed under the BSD-3-Clause licence. pybwa's metadata says MIT, but every pybwa wheel compiles in bwa, which is distributed under the GPLv3: an installation of hicstuff therefore contains GPLv3 code. This matters only to whoever redistributes it, in a Docker image or a packed environment for instance, who must then meet the GPLv3's terms for bwa. The Docker image also ships the bowtie2 and bwa programs, both under the GPLv3.