Skip to main content

Circe: Package for building co-accessibility networks from ATAC-seq data.

Reason this release was yanked:

Error in for loop: only last chromosome is saved

Project description

Circe logo


CIRCE: Cis-regulatory interactions between chromatin regions

Unit_Tests codecov PyPI version Downloads

Description

This repo 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.

It 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 R package Cicero is available here.


Metacalls computation might create differences, but scores will be identical 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).

If you have any suggestion, don't hesitate ! This package is still a work in progress :)

Installation

The package can be installed using pip:

pip install circe-py

and from github

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

Warning: If you clone the repo, don't stay in the repo to run your script because python will import the non-compiled cython file (probable error: circe.pyquic does not have a quic function)

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

ci.plot_connections(
    adata,
    chromosome="chr1",
    start=1e7,
    end=1.3e7

Comparison to Cicero R package


On the same metacells obtained from Cicero code.

All tests 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:

  • Calculate metacells !
  • Add stats on similarity on large datasets.
  • Add stats on runtime, memory usage.
  • Implement the multithreading use. Should speed up even more.
  • Fix seed for reproducibility.

Usage

It is currently developped to work with AnnData objects. Check Example1.ipynb for a simple usage example.

Citation

Trimbour Rémi (2024). Circe: Co-accessibility network from ATAC-seq data in python (based on Cicero package). Package version 0.2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

circe_py-0.3.0.tar.gz (176.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

circe_py-0.3.0-cp310-cp310-manylinux_2_35_x86_64.whl (199.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.35+ x86-64

File details

Details for the file circe_py-0.3.0.tar.gz.

File metadata

  • Download URL: circe_py-0.3.0.tar.gz
  • Upload date:
  • Size: 176.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.9 Linux/6.8.0-45-generic

File hashes

Hashes for circe_py-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6c171c17665c4d2c37b9c8f0ac3c66523a9061cf0f32737a42f2c0e7df87a0ad
MD5 ed2a01cc96b5065b29c6c997b9070a32
BLAKE2b-256 dd4a66beb0a09f1f4f59fc2cd030af55f06d82b9028dac0dc21e46c4e060e698

See more details on using hashes here.

File details

Details for the file circe_py-0.3.0-cp310-cp310-manylinux_2_35_x86_64.whl.

File metadata

  • Download URL: circe_py-0.3.0-cp310-cp310-manylinux_2_35_x86_64.whl
  • Upload date:
  • Size: 199.7 kB
  • Tags: CPython 3.10, manylinux: glibc 2.35+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.9 Linux/6.8.0-45-generic

File hashes

Hashes for circe_py-0.3.0-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 89bb7e84eb0ebcebc2457ecc33e57e89ef2f43e76d8f249913271d525793fbc8
MD5 8fe09ef14db6b9be8987ff6a1b147a7c
BLAKE2b-256 861a8f6bcdc7dcfe68c2a95f9b2055ae82cbd19448ce217469869b6123217e3a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page