Skip to main content

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

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

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
)

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.3.6.

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.6.post2.tar.gz (112.7 kB view details)

Uploaded Source

Built Distributions

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

circe_py-0.3.6.post2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

circe_py-0.3.6.post2-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl (3.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ i686

circe_py-0.3.6.post2-cp312-cp312-macosx_11_0_arm64.whl (76.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

circe_py-0.3.6.post2-cp312-cp312-macosx_10_13_x86_64.whl (78.6 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

circe_py-0.3.6.post2-cp312-cp312-macosx_10_13_universal2.whl (109.7 kB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

circe_py-0.3.6.post2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

circe_py-0.3.6.post2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (3.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ i686

circe_py-0.3.6.post2-cp311-cp311-macosx_11_0_arm64.whl (76.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

circe_py-0.3.6.post2-cp311-cp311-macosx_10_9_x86_64.whl (78.6 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

circe_py-0.3.6.post2-cp311-cp311-macosx_10_9_universal2.whl (109.7 kB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

circe_py-0.3.6.post2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

circe_py-0.3.6.post2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (3.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ i686

circe_py-0.3.6.post2-cp310-cp310-macosx_11_0_arm64.whl (76.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

circe_py-0.3.6.post2-cp310-cp310-macosx_10_9_x86_64.whl (78.7 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

circe_py-0.3.6.post2-cp310-cp310-macosx_10_9_universal2.whl (110.0 kB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file circe_py-0.3.6.post2.tar.gz.

File metadata

  • Download URL: circe_py-0.3.6.post2.tar.gz
  • Upload date:
  • Size: 112.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for circe_py-0.3.6.post2.tar.gz
Algorithm Hash digest
SHA256 e94d41c5b1ccd5178434531f7b995f1ff2328a79a32fb0d0a47cf22edc3e96ef
MD5 8339a22d10951b022510670b67884f60
BLAKE2b-256 f4d7dee87a0ab3e7672ba2073fd9e280d0353fab04d61c23cd14af61c2bcefe1

See more details on using hashes here.

File details

Details for the file circe_py-0.3.6.post2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for circe_py-0.3.6.post2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 86cce74c9833262cb76e8b2778595897d04dbd401ec7ec84d93fb1294653f464
MD5 54340caab65190884234e0e7c903b5d6
BLAKE2b-256 26957ba717207252a4470b095afe535846aba58c430502c8be1a3d4f0263acd4

See more details on using hashes here.

File details

Details for the file circe_py-0.3.6.post2-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for circe_py-0.3.6.post2-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 6935a29eab2832055479f2dda14b7cd7e0cffc2691a60acae1582fd21b602f51
MD5 695a8646036444376d34e78554961166
BLAKE2b-256 5ba924ba3235838d4810b7396e976f70d005b2cd3547a3749936711d61a1a8be

See more details on using hashes here.

File details

Details for the file circe_py-0.3.6.post2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for circe_py-0.3.6.post2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8cc30f9536b5c2c23aacca8e07b885daf7a3a7f2a5cba6936b4a293fd4db7eed
MD5 803cb8b326189f7d3cddae0a16085293
BLAKE2b-256 56a60f4607250b532ce040970551f20ac51db00fbf487a12dac6b0ab4c72358d

See more details on using hashes here.

File details

Details for the file circe_py-0.3.6.post2-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for circe_py-0.3.6.post2-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 769581aa3e7bde0da1012529ff5c2a76810df46674c9f33d978444809a28564d
MD5 bfaa8c0e389bbf3d30b8b7eb842dfea7
BLAKE2b-256 c1cbf7370e926316c61d59a3a4334168266554f9a88ec7bc3f990bc9e11aa62f

See more details on using hashes here.

File details

Details for the file circe_py-0.3.6.post2-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for circe_py-0.3.6.post2-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d447db8465a69b93927c41aa18bdad6180498ac70271709dcaabd5afb0069828
MD5 68f5b48dd3941611caa7d4f969092ed6
BLAKE2b-256 eba584f466380f67e04c10353025c11a893485f6a53e07b4334c5644d9e0ca5f

See more details on using hashes here.

File details

Details for the file circe_py-0.3.6.post2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for circe_py-0.3.6.post2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9d2bf9fcfca53112589f971ccf8ad40722e5f4f4b267f5c0c0ab91c4d5095d50
MD5 d58916b64860ab3225f6950ac8c38670
BLAKE2b-256 21c6416003ac4dd9d029386a19b13c9040199c6fdfedc498ceaa32c2072a9bbb

See more details on using hashes here.

File details

Details for the file circe_py-0.3.6.post2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for circe_py-0.3.6.post2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 71d88efaa4b199e364b9fbe59193e60034192cd99b834d6920bd3de26cd06d51
MD5 2ba3a09d6bf27176289fcc16f303dd7b
BLAKE2b-256 297312a01974f61b8e8000ad0d0384497d304e48a3ff7c6906a87526ab7495de

See more details on using hashes here.

File details

Details for the file circe_py-0.3.6.post2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for circe_py-0.3.6.post2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eee6ad6a04c7424e736094599f7f2a0326a8d6ce94f2fb006b1ba616b3231d97
MD5 08b84f44d1900a67156d012da5dce23b
BLAKE2b-256 bc7b42b468e84bd919a2eadd7b5c9d66d49683cdf69448d446cf8d48fd8388c0

See more details on using hashes here.

File details

Details for the file circe_py-0.3.6.post2-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for circe_py-0.3.6.post2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cf7924b5b0b772e2fc79a834e65f9715f6c2ea823e27017c42865ffaf7ac7706
MD5 c2eb1e5c7e433eb374900322dd172071
BLAKE2b-256 0ff3d9c6674ee2e86b830af380f3cbad962a9af13aa16c71628bff8944952f09

See more details on using hashes here.

File details

Details for the file circe_py-0.3.6.post2-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for circe_py-0.3.6.post2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7a07584b0350fb26799ec235b4b384218dd83389c240586b1a736da7dc60ae0a
MD5 d7cbbb6056415b23267a2b03fc68f928
BLAKE2b-256 475ca4f486aa41a15f28ab96f585e67b9bf816478d887c1ca0f5a38a7daf2f72

See more details on using hashes here.

File details

Details for the file circe_py-0.3.6.post2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for circe_py-0.3.6.post2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0a90174547d32db0130dcee8253500356b07c889e9218c0228b192690557b069
MD5 04d60d54ec263cdcd7b99f9eadbd6bfd
BLAKE2b-256 d637a90950d476fc6b30c216c0ce6cdf97b81fe3265bef3cb9c1a076a063fbc9

See more details on using hashes here.

File details

Details for the file circe_py-0.3.6.post2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for circe_py-0.3.6.post2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 e9c424514486a1fc3db72205f2b168dad43df5fbd4986731656c4d504c61c31d
MD5 3191083d60c960663b90b103530444ac
BLAKE2b-256 01504031fcfd14901f4f3a05cfd318afe5b10de97418cde2520b51856a28f604

See more details on using hashes here.

File details

Details for the file circe_py-0.3.6.post2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for circe_py-0.3.6.post2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d702f840adacf21906a613b05db99e85a6de04eeed06e4aaf0d97d51fb8fa843
MD5 5125b16a234921bb37c8ee5691306e7c
BLAKE2b-256 a8a4b6a59440a6a9907d4a306dae70569531c56c55e0d6ac4660bb54c61d00b9

See more details on using hashes here.

File details

Details for the file circe_py-0.3.6.post2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for circe_py-0.3.6.post2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ba6aaffe2a7c5620db3a136b7dba1bc9a1e71e1738861aa23b2cde8f9492d670
MD5 a25ca5c5474502a3c86b35a0c9e37baa
BLAKE2b-256 a246bb1df752bbda5be0ae47af40e16445e43ed9874e3ba4c28888c8f1de2fb7

See more details on using hashes here.

File details

Details for the file circe_py-0.3.6.post2-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for circe_py-0.3.6.post2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 16dc2e7fbc47af6d54768dd67a4e8345a4afe6cea2a917165d2872a5e288d9c5
MD5 c9edea711df62f1c80422de91bee40da
BLAKE2b-256 2ce047e1b7e2b6fddd1d0e71df0f661c3e0dffc9a70def08e749ba3d139dd14a

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