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.

Results may slitghly vary between both packages, notably due to the different implementations of graphical lasso.
Currently, scores are very close when applied to the same metacells, computed from Cicero's methodology. (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

atac = ad.read_h5ad('atac_data.h5ad')
atac = ci.add_region_infos(atac)
ci.compute_atac_network(atac)
df_network = ci.extract_atac_links(atac)

Comparison to Cicero R package


On the same metacells obtained from Cicero code.

All tests can be found in the circe benchmark repo

Toy dataset 1 (fake data):

  • Pearson correlation coefficient: 0.999126
  • Spearman correlation coefficient: 0.99838

Real dataset 2 (subsample of neurips PBMC)

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

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.2.2.tar.gz (108.1 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.2.2-cp310-cp310-manylinux_2_35_x86_64.whl (165.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.35+ x86-64

File details

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

File metadata

  • Download URL: circe_py-0.2.2.tar.gz
  • Upload date:
  • Size: 108.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.9 Linux/6.5.0-44-generic

File hashes

Hashes for circe_py-0.2.2.tar.gz
Algorithm Hash digest
SHA256 0b828b8819bf1f0a6884016deb73e8551ac1d505c9091fbff2643dd48ebcc20e
MD5 4e77c69ddf91d42c5ec2caa551686c93
BLAKE2b-256 949adf5b1c686bd036084875fa827e131b38df7333bf65a59cbd17ca974d9021

See more details on using hashes here.

File details

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

File metadata

  • Download URL: circe_py-0.2.2-cp310-cp310-manylinux_2_35_x86_64.whl
  • Upload date:
  • Size: 165.0 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.5.0-44-generic

File hashes

Hashes for circe_py-0.2.2-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 bd7602b178a9ee7c20a605fef2e3ca21e670083b6494c29a2c0e4be141b0162a
MD5 7920370be6c5ff141e34c893c9375639
BLAKE2b-256 62e4a538772c80356e1cf4c135a7bc484dd9fcbed43c33142e64ee1c077d5481

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