Skip to main content

HICTDA

HICTDA is a Python package for persistent-homology analysis of Hi-C chromatin contact maps stored in .hic format and identifying Topologically Associating Domains (TADs).

Author

Alamin Mustafa, MBBS Faculty of Medicine, Al-Neelain University Khartoum, Sudan. ORCID: https://orcid.org/0000-0003-1129-6284

Citation

If you use HICTDA in your research, please cite:

Mustafa, A. (2026). HICTDA: Persistent Homology Analysis of Hi-C Chromatin Contact Maps. Version 0.1.1.

BibTeX:

@software{mustafa2026hictda,
  author       = {Mustafa, Alamin},
  title        = {HICTDA: Persistent Homology Analysis of Hi-C Chromatin Contact Maps},
  version      = {0.1.1},
  year         = {2026},
  url          = {https://github.com/Alamino90/HICTDA}
}

The package provides:

- chromosome and genomic-region selection;
- configurable Hi-C bin resolution;
- mandatory matrix normalization;
- conversion of contact frequencies to dissimilarities;
- Vietoris-Rips persistent homology through dimension H1;
- H1 feature count, mean, median, and standard deviation;
- contact-map visualization;
- persistence diagram;
- persistence barcode;
- H1 persistence distribution;
- H1 persistence box plot;
- machine-readable CSV/JSON output;
- a single high-level analysis function and a command-line interface.

## Installation

Create a virtual environment and install:

```bash
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -e .

For development:

pip install -e ".[dev]"

Basic Python usage

from hictda import analyze_hic

results = analyze_hic(
    hic_file="ENCFF718AWL.hic",
    chromosome="3",
    start=140_000_000,
    end=190_000_000,
    resolution=50_000,
    normalization="KR",
    output_dir="results"
)

print(results.statistics)

Entire chromosome

If start and end are omitted, the package analyzes the complete selected chromosome, subject to the size and memory limits of the machine.

results = analyze_hic(
    hic_file="sample.hic",
    chromosome="3",
    resolution=50_000,
    normalization="KR"
)

Single-chromosome .hic files

A .hic file does not need to contain an entire genome. The selected chromosome is validated against the chromosomes actually present in the file.

CLI

hictda analyze sample.hic \
  --chromosome 3 \
  --start 140000000 \
  --end 190000000 \
  --resolution 50000 \
  --normalization KR \
  --output results

Outputs

The output directory contains:

contact_map.png
persistence_diagram.png
persistence_barcode.png
h1_distribution.png
h1_boxplot.png
hictda_summary.png
h1_persistence.csv
summary.json

Scientific note

The default contact-to-dissimilarity transformation is:

[ d_{ij} = \frac{1}{C_{ij}+\epsilon}. ]

This maps larger contact frequency to smaller dissimilarity. The transformation is exposed as a parameter so that alternative transformations can be added without changing the rest of the pipeline.

The package currently uses the supplied Hi-C normalization method through hic-straw; the default and recommended method for this implementation is Knight-Ruiz (KR).

Reproducibility

The package records the input file, chromosome, genomic interval, resolution, normalization, distance method, epsilon, and persistent-homology parameters in summary.json.

Associated Publication

A manuscript describing HICTDA: A Persistent Homology Framework for Multiscale Identification of Topologically Associating Domains (TADs) in Hi-C Data is currently in preparation and will be published soon.

License

MIT

Metadata

Release files for hictda 0.1.1

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

Source distribution (sdist)

Source distribution for hictda 0.1.1
File Size Uploaded
hictda-0.1.1.tar.gz 12.8 kB Details

Built distribution (wheel)

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

Total release size: 25.6 kB

Release files / hictda-0.1.1.tar.gz

Download URL hictda-0.1.1.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
77a6b893300bed1988c5664ae0281a56000474ae5f191f4d13fe440757a6cea0
BLAKE2b-256 checksum
How to use checksums
7f8f75aa61b22e10bd9469b83c9a94166e84d6598d42154fabf8077c093e61b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.

Transparency log

Release files / hictda-0.1.1-py3-none-any.whl

Download URL hictda-0.1.1-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f64e657b574e47c136fdf4ad3b3ee9b31330fb69967e4458d27dbb6fa082e7ef
BLAKE2b-256 checksum
How to use checksums
0c6ac659557d1cd713bd3bfddfec4a489321246597f42f68bcef8f374e95321e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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