Skip to main content

hicstuff

PyPI version PyPI - Python Version install with bioconda CI Docs codecov DOI Ruff

Hi-C contact maps, from reads to matrices. hicstuff aligns Hi-C reads, pairs them, filters out the uninformative 3C events and builds the contact map, in one command, for any genome. It also views, rebins, subsamples and converts contact maps, computes the distance law, and exposes every step as a Python library.

Documentation: https://koszullab.github.io/hicstuff/

Installation

pip install hicstuff

hicstuff needs Python 3.10 or later, on Linux or macOS. That alone runs the whole pipeline in mapping mode 5spm, the recommended one, which aligns with bwa in-process, through pybwa. bowtie2 and minimap2, which the other mapping modes can use, are separate programs. hicstuff is also on bioconda, and in a Docker image, ghcr.io/koszullab/hicstuff. See Installation for the aligners, the platforms that need a compiler, and the licence.

Quick start

Mapping mode 5spm is the recommended way to process a library. It aligns the mates with bwa mem -5SPM, as the 4DN, Juicer and Arima pipelines do, and records each mate at its aligned 5' end, the end of the sequenced molecule:

hicstuff pipeline --mapping 5spm --enzyme DpnII --genome genome.fa --outdir out/ \
    R1.fq.gz R2.fq.gz

writes the contact map at restriction-fragment resolution, out/abs_fragments_contacts_weighted.cool, with the pairs it was built from, the fragments and a log. --binning 1000 writes a balanced multi-resolution .mcool instead, at 1 kb and up; --filter and --duplicates remove the uncuts, loops and PCR duplicates.

hicstuff stats out/hicstuff_*.log
hicstuff view --binning 10kb --normalize --output map.png \
    out/abs_fragments_contacts_weighted.cool

The Quickstart runs these steps on the test data of this repository.

Commands

Command
pipeline Run the whole pipeline, from reads, BAM or pairs files to a contact map
digest Cut a genome into restriction fragments
filter Remove uncuts, loops and impossible pairs from a pairs file
iteralign Align reads iteratively, from 20 bases up
cutsite Cut reads at their ligation sites
rebin Write a contact map at a coarser resolution
subsample Draw contacts at random from a contact map
convert Convert a contact map between cool, 2D bedgraph and graal
view Draw a contact map, or the ratio of two
scalogram Draw contacts by distance along the genome
distancelaw Compute and plot the distance law, P(s)
missview Show the bins reads of a given length cannot reach
stats Summarise the log of a pipeline run

Contributing

Bug reports, suggestions and pull requests are welcome. See Contributing for the tests, the documentation and releases.

Citation

Cyril Matthey-Doret, Lyam Baudry, Amaury Bignaud, Axel Cournac, Remi-Montagne, Nadège Guiglielmoni, Théo Foutel Rodier and Vittore F. Scolari. 2020. hicstuff: Simple library/pipeline to generate and handle Hi-C data. Zenodo. http://doi.org/10.5281/zenodo.4066363. BibTeX: Citing hicstuff.

Licence

BSD-3-Clause. An installation of hicstuff also contains bwa, under the GPLv3, through pybwa: see Licence.

Metadata

Release files for hicstuff 4.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hicstuff 4.0.0
File Size Uploaded Provenance Actions
hicstuff-4.0.0.tar.gz 216.1 kB Without provenance Details for hicstuff-4.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hicstuff 4.0.0
File Interpreter ABI Platform Actions
hicstuff-4.0.0-py3-none-any.whl Python 3 none any Details for hicstuff-4.0.0-py3-none-any.whl

Total release size: 344.7 kB

Release files / hicstuff-4.0.0.tar.gz

Download URL hicstuff-4.0.0.tar.gz
Size 216.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ddb4045959fb9f01ae86f898a3764cb2166ac61fbe33aa35dd74b8c56f1404cc
BLAKE2b-256 checksum
How to use checksums
59dc0bd2156c3f540c3f340dbd76071b1b3f8b54a5838f7154332bf5d5aa60ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hicstuff-4.0.0-py3-none-any.whl

Download URL hicstuff-4.0.0-py3-none-any.whl
Size 128.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
108aa76646b1eaa6607e4adad253188e8bcc765fa4152d57e16bd7bb11174d38
BLAKE2b-256 checksum
How to use checksums
8d6101c7bb66e8503560fd3d1b630048fef937d0e4dbe6e194ae6e52def5235c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for hicstuff 4.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page