Skip to main content

Release Coverage Pipeline

drawing

Periodicity Evaluation in scATAC-seq data for quality assessment

A python tool for ATAC-seq quality control in single cells. On the bulk level quality control approaches rely on four key aspects:

- signal-to-noise ratio 
- library complexity
- mitochondrial DNA nuclear DNA ratio 
- fragment length distribution 

Hereby relies PEAKQC on the evaluation of the fragment length distribution. While on the bulk level the evaluation is done visually, it is not possible to do that on the single cell level. PEAKQC solves this constraint with an convolution based algorithmic approach.

API Documentation

A detailed API documentation is provided by our read the docs page: https://loosolab.pages.gwdg.de/software/peakqc/

Workflow

To execute the tool an anndata object and fragments, corresponding to the cells in the anndata have to be provided. The fragments can be either determined from a bamfile directly or by an fragments file in the bed format. If a fragments bedfile is available this is recommended to shorten the runtime.

Installation

PyPi

pip install peakqc

From Source

1. Enviroment & Package Installation

  1. Download the repository. This will download the repository to the current directory
git@gitlab.gwdg.de:loosolab/software/peakqc.git
  1. Change the working directory to the newly created repository directory.
cd sc_framework
  1. Install analysis environment. Note: using mamba is faster than conda, but this requires mamba to be installed.
mamba env create -f peakqc_env.yml
  1. Activate the environment.
conda activate peakqc
  1. Install PEAKQC into the enviroment.
pip install .

2. Package Installation

  1. Download the repository. This will download the repository to the current directory
git@gitlab.gwdg.de:loosolab/software/peakqc.git
  1. Change the working directory to the newly created repository directory.
cd sc_framework
  1. Install PEAKQC into the enviroment.
pip install .

Quickstart

Below is a minimal example showing how to integrate FLD scoring into a Jupyter Notebook. A fully worked example is available at paper/example_notebook.ipynb.

  1. Load your AnnData object
   import scanpy as sc

   # replace with your path to the .h5ad file
   anndata = sc.read_h5ad('path/to/your_data.h5ad')

Note: We recommend storing your cell barcodes as the .obs index in adata. If your barcodes are instead in a specific .obs column, you can override this via the barcode_col parameter (see below).

  1. Import FLD scoring function
from peakqc.fld_scoring import add_fld_metrics
  1. Prepare fragment files

    • Provide either a BED or BAM file via fragments=.

    • BED files are recommended for faster runtime.

    • Example:

fragments = 'path/to/fragments.bed'      # or .bam
  1. Run FLD scoring
adata = add_fld_metrics(adata=anndata,
                        fragments=fragments,
                        barcode_col=None,
                        plot=True,
                        save_density=None,
                        save_overview=None,
                        sample=0,
                        n_threads=8,
                        sample_size=5000,
                        mc_seed=42,
                        mc_samples=1000
                        )
  1. Filter on PEAKQC scores In our experience, PEAKQC scores above 100 are generally effective for filtering out low-quality cells. Hereby PEAKQC scores positively correlate with improving FLD patterns. However, it is important to note that optimal thresholds can vary between datasets and should be tuned to achieve reliable results.

    Threshold selection may also depend on the specific requirements of your downstream analysis, and should be adjusted accordingly.

For a step-by-step walkthrough along with plotting examples, see the example notebook at paper/example_notebook.ipynb

How to cite

Thank you for using PEAKQC — we hope it helps with your single-cell ATAC-seq quality control!

If PEAKQC contributed to your research, we would be grateful if you considered citing our paper. It is entirely optional, but it helps others discover the tool and supports its continued development.

Detleffsen, J., Bruns, B. J., Bentsen, M., Kuenne, C., & Looso, M. PEAKQC: Periodicity Evaluation in scATAC-seq data for quality assessment. DOI: <https://doi.org/10.1093/bib/bbaf465>

BibTeX:

@article{peakqc,
  title   = {PEAKQC: Periodicity Evaluation in scATAC-seq data for quality assessment},
  author  = {Detleffsen, Jan and Bruns, Brenton Joey and Bentsen, Mette and Kuenne, Carsten and Looso, Mario},
  url     = {https://doi.org/10.1093/bib/bbaf465}
}

Metadata

Release files for PEAKQC 0.1.8

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

Source distribution (sdist)

Source distribution for PEAKQC 0.1.8
File Size Uploaded
peakqc-0.1.8.tar.gz 95.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for PEAKQC 0.1.8
File Interpreter ABI Platform
peakqc-0.1.8-py3-none-any.whl Python 3 none any Details

Total release size: 95.2 MB

Release files / peakqc-0.1.8.tar.gz

Download URL peakqc-0.1.8.tar.gz
Size 95.2 MB
Tags Source
SHA-256 checksum
How to use checksums
13870cb3590bcf4c235819d5fd2d67bd4f68d7190b82a3d05f5deba4dc577232
BLAKE2b-256 checksum
How to use checksums
537ad5e8061d1a8a5af8e60cfe3cad6bb2d5931109d302fc3909d1a0ebd57d4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / peakqc-0.1.8-py3-none-any.whl

Download URL peakqc-0.1.8-py3-none-any.whl
Size 20.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f84e6181e35954c4f2c94f1932a3248c620df1be292aca8f7817195436c23e2
BLAKE2b-256 checksum
How to use checksums
79a1699d625dfe404bf0d0e6323cf29cc519b1b6534c43c5109e4aae508243e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

0.1.8 This release

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

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