Skip to main content

RepliSage

Python OpenMM NumPy Numba SciPy Matplotlib PyVista tested with pytest License GPL v3

3D structures in G1, S and G2/M: two sister chromatids (orange, blue) with cohesin, CTCF and replication forks

One simulated cell cycle: G1, S (replication forks, sisters appear) and G2/M. Sister chromatids in orange and blue, cohesin in green, CTCF orientation as purple arrows, forks in turquoise.

RepliSage simulates how loop extrusion, epigenetic state and DNA replication shape chromatin in 3D, from G1 through S phase to G2/M. It runs a replication simulation, a Monte Carlo of loop-extruding factors (LEFs) and Potts spins (A/B compartments), and optionally 3D structures with OpenMM. Every run ends with a single report.html.

Install

Python 3.10 or newer.

git clone https://github.com/SFGLab/RepliSage && cd RepliSage
pip install -r requirements.txt      # or: pip install .   (gives the `replisage` command)

The 3D part (OpenMM) is faster on a GPU; the Monte Carlo runs on CPU. A Docker image is provided (Dockerfile).

Run

The everyday choices are command-line flags (-h lists them all):

# loop extrusion only
python src/run.py --bedpe-file loops.bedpe --region chr14:80835000-98674700

# add replication timing (bigWig, txt, parquet, or `builtin`), then decide about 3D
python src/run.py --bedpe-file loops.bedpe --region chr14:80835000-98674700 --rt-file timing.bigWig --run-md true

# replication stress, several replicas
python src/run.py -c my_config.ini --with-stress --n-replicas 4 --threads 4
Flag Meaning
-c FILE Read a config file
--bedpe-file FILE CTCF input: loops (BEDPE) or peaks (BED, narrowPeak)
--smooth-sigma BEADS, --no-smooth Width of the Gaussian smoothing of the CTCF input, or switch it off
--motif-genome FASTA Read CTCF orientation from motifs when the input has none
--hic FILE Validate the model against a Hi-C map (.hic; pip install "pyRepliSage[hic]")
--rt-file FILE Replication timing. No file: no replication simulation, no forks
--region CHR:START-END Region to model
--run-md true/false Build 3D structures (needs replication data or not, both work)
--with-stress Replication stress (off by default)
--n-replicas, --seed, --out, --name, --platform, --threads Run control

Everything else (Monte Carlo, replication and MD energies, force field, plots) is set only in the config file: copy src/config.ini or one of the annotated files in examples/ and run it with -c. Flags win over the file; the file wins over the defaults.

More in the documentation: command line, pipeline, replication, Monte Carlo and 3D models, config, analysis.

Output

Each run creates a folder results/<run_name>/ (one replica_XX/ per replica) containing:

File What
report.html Start here: model, figures, diagnostics, command and all parameters
viewer_3d.html Interactive 3D viewer: trajectory bar, cell-cycle phase, colour modes (sister chromatids, compartments, rainbow, replication) and a moving-window contact map with LEFs and forks marked
movie_3d.mp4, movie_3d.gif Interpolated PyVista movie
ensemble/*.cif One mmCIF per structure (chains A and B = sister chromatids); open in ChimeraX with view.cxc
plots/, metadata/ Figures (png + svg) and raw arrays / CSV statistics
config_used.ini Exact configuration, re-run with -c

Switch parts off with --no-report and --no-viewer. The 3D movies take minutes to render: add --skip-movies for quick runs.

Configuration

src/config.ini documents every parameter. Precedence: defaults < config file < command-line flags.

Tests

pip install -e ".[test]" && pytest            # add -m "not slow" to skip OpenMM / full-pipeline tests

Citation

  • Korsak, S. et al. "RepliSage: a stochastic graph-based framework for 3D chromatin modeling across the cell cycle." Nucleic Acids Research 54.12 (2026): gkag618.
  • Buka, K. et al. "Improved cohesin HiChIP protocol and bioinformatic analysis for robust detection of chromatin loops and stripes." Communications Biology 8.1 (2025): 437.
  • Massey, D. J. and Koren, A. "High-throughput analysis of single human cells reveals the complex nature of DNA replication timing control." Nature Communications 13 (2022): 2402.

Metadata

Release files for pyRepliSage 1.0.2

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

Source distribution (sdist)

Source distribution for pyRepliSage 1.0.2
File Size Uploaded Provenance Actions
pyreplisage-1.0.2.tar.gz 7.7 MB Without provenance Details for pyreplisage-1.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 15.4 MB

Release files / pyreplisage-1.0.2.tar.gz

Download URL pyreplisage-1.0.2.tar.gz
Size 7.7 MB
Tags Source
SHA-256 checksum
How to use checksums
58225bdeb27bb04202783c6e10d34eff89453b7a814df58dda0ec757d636cb69
BLAKE2b-256 checksum
How to use checksums
708cb0953540947411766871ef815aa457755f52b05a59f2bdc4f993c5dbdb24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Release files / pyreplisage-1.0.2-py3-none-any.whl

Download URL pyreplisage-1.0.2-py3-none-any.whl
Size 7.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
96c5386f34251bd722c6c774a42f4d04d1edc1680fe1d8c00c35fc25bc225515
BLAKE2b-256 checksum
How to use checksums
eda8f3cc13c296f781a340304d548454205ef3d22a85d5707f9cbb4a40608664
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Security for pyRepliSage 1.0.2

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.

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