Skip to content

cantinilab/Circe

Repository files navigation

Circe logo


CIRCE: Cis-regulatory interactions between chromatin regions

Unit_Tests Wheels codecov PyPI version Downloads

Description

This repository contains a Python package for inferring co-accessibility networks from single-cell ATAC-seq data, using skggm for the graphical lasso and scanpy for data processing.

You can check our preprint here for more details! 😊
https://doi.org/10.1101/2025.09.23.678054

While updating the pre-processing, CIRCE's algorithm is based on the pipeline and hypotheses presented in the manuscript "Cicero Predicts cis-Regulatory DNA Interactions from Single-Cell Chromatin Accessibility Data" by Pliner et al. (2018). This original R package Cicero is available here.

Installation

The package can be installed using pip:

pip install circe-py

and from GitHub

pip install "git+https://github.com/cantinilab/circe.git"

Minimal example

import anndata as ad
import circe as ci

# Load the data
atac = ad.read_h5ad('atac_data.h5ad')
atac = ci.add_region_infos(atac)

# Compute the co-accessibility network
ci.compute_atac_network(atac)

# Extract the network and find CCANs modules
circe_network = ci.extract_atac_links(atac)
ccans_module = ci.find_ccans(atac)

Visualisation

fig, ax = plt.subplots(1, figsize = (20, 6))
genes_df = ci.downloads.download_genes()

ci.draw.plot_connections_genes(
    connections=atac,  # Main parameters
    genes=genes_df,
    chromosome="chr1",
    start=50_000,
    end=300_000,
    gene_spacing=30_000,
    abs_threshold=0.0,
    y_lim_top=-0.01,   # Visual parameters
    track_spacing=0.01,
    track_width=0.01,
    ax=ax
)

Usage

You can go check out our documentation for more examples!
https://circe.readthedocs.io/
The documentation is still in building, so don't hesitate to open any issues or requests you might have in this repo. 😊

Benchmark & Comparison to Cicero R package


Metacalls computation might create differences, but scores will be identical when applied to the same metacalls (cf comparison plots below). It should run significantly faster than Cicero (e.g., running time of 5 sec instead of 17 min for the dataset 2).
On the same metacells obtained from the Cicero code.

All tests run in the preprint can be found in the circe benchmark repo.

Real dataset 2 - subsample of 10x PBMC (2021)

  • Pearson correlation coefficient: 0.999958
  • Spearman correlation coefficient: 0.999911

Performance on real dataset 2:

  • Runtime: ~100x faster
  • Memory usage: ~5x less

Coming:

  • Gene activity calculation

Citation

Trimbour R., Saez Rodriguez J., Cantini L. (2025). CIRCE: a scalable Python package to predict cis-regulatory DNA interactions from single-cell chromatin accessibility data. bioRxiv, 2025.09.23.678054, doi: https://doi.org/10.1101/2025.09.23.678054

About

Co-accessibility network from single-cell ATAC-seq data. Python code with AnnData, based on Cicero algorithm.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published