Skip to main content

Perturbio

┌─────────────────────────────────────────────────────────────────┐
│                                                                 │
│  ██████╗ ███████╗██████╗ ████████╗██╗   ██╗██████╗ ██████╗ ██╗ │
│  ██╔══██╗██╔════╝██╔══██╗╚══██╔══╝██║   ██║██╔══██╗██╔══██╗██║ │
│  ██████╔╝█████╗  ██████╔╝   ██║   ██║   ██║██████╔╝██████╔╝██║ │
│  ██╔═══╝ ██╔══╝  ██╔══██╗   ██║   ██║   ██║██╔══██╗██╔══██╗██║ │
│  ██║     ███████╗██║  ██║   ██║   ╚██████╔╝██║  ██║██████╔╝██║ │
│  ╚═╝     ╚══════╝╚═╝  ╚═╝   ╚═╝    ╚═════╝ ╚═╝  ╚═╝╚═════╝ ╚═╝ │
│                                                                 │
│         Crop-Seq Analysis Made Simple                          │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Perturbio is a comprehensive Python package for end-to-end analysis of Crop-Seq experiments (CRISPR pooled screens + single-cell RNA sequencing). From raw data to biological insights in under 5 minutes.

Features

  • Guide Extraction: Automatically identify CRISPR guide RNAs in single cells
  • Differential Expression: Discover genes affected by perturbations
  • Beautiful Visualizations: Publication-ready plots with minimal code
  • Scanpy Integration: Works seamlessly with the scanpy ecosystem
  • Simple CLI: One command to run complete analysis
  • Fast: Analyze thousands of cells in minutes

Installation

Install from source:

git clone https://github.com/Siavashghaffari/Perturbio.git
cd Perturbio
pip install -e .

Once released on PyPI:

pip install perturbio

Quick Start

Command Line

# Run complete analysis
perturbio analyze cropseq_data.h5ad --guides guides.csv

# Results saved to perturbio_results_YYYYMMDD_HHMMSS/

Python API

from perturbio import CropSeqAnalyzer

# One-liner magic
analyzer = CropSeqAnalyzer("cropseq_data.h5ad")
results = analyzer.run()

# Access results
print(results.top_hits("BRCA1_guide1", n=20))
results.plot_volcano("MYC_guide1")

Scanpy Integration

import scanpy as sc
import perturbio as pt

# Standard scanpy workflow
adata = sc.read_h5ad("cropseq_data.h5ad")
sc.pp.normalize_total(adata)
sc.pp.log1p(adata)

# Extract guides
pt.guides.extract(adata, guide_file="guides.csv")

# Differential expression
pt.tl.differential_expression(adata, groupby='perturbation', control='non-targeting')

# Visualize
pt.pl.volcano(adata, perturbation='BRCA1_guide1')

Guide Library Format

Create a CSV file with your guide library:

guide_id,target_gene,guide_sequence
BRCA1_guide1,BRCA1,GCACTCAGGAAACAGCTATG
BRCA1_guide2,BRCA1,CTGAAGACTGCTCAGTGTAG
MYC_guide1,MYC,GTACTTGGTGAGGCCAGCGC
non-targeting_1,control,GTAGCGAACGTGTCCGGCGT

Documentation

Requirements

  • Python 3.9+
  • AnnData/Scanpy for single-cell analysis
  • Works on macOS, Linux, and Windows

Authors

This work was developed by Siavash Ghaffari. For any questions, feedback, or additional information, please feel free to reach out. Your input is highly valued and will help improve and refine this pipeline further.

Metadata

Release files for perturbio 0.1.0

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

Source distribution (sdist)

Source distribution for perturbio 0.1.0
File Size Uploaded Provenance Actions
perturbio-0.1.0.tar.gz 28.8 kB Without provenance Details for perturbio-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for perturbio 0.1.0
File Interpreter ABI Platform Actions
perturbio-0.1.0-py3-none-any.whl Python 3 none any Details for perturbio-0.1.0-py3-none-any.whl

Total release size: 57.1 kB

Release files / perturbio-0.1.0.tar.gz

Download URL perturbio-0.1.0.tar.gz
Size 28.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b92f2481d47937baa4c26147e9dc024faf52be059e1991e3be951cf266abb16a
BLAKE2b-256 checksum
How to use checksums
b29f0271ec4418b0f70414301630dce37e5e040570c979c06c8cefd72e8b07e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.9

Release files / perturbio-0.1.0-py3-none-any.whl

Download URL perturbio-0.1.0-py3-none-any.whl
Size 28.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55eb63c4e70c30e2a0461244f5656f329dd9f328bc6bab92fa659677c3a69857
BLAKE2b-256 checksum
How to use checksums
8610cb3ecd8f358521276c07ac92bea40511c62b1a900085fc67761f680817ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.9

Security for perturbio 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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