CellOracle Documentation
repository·master·Indexed 19 days ago
https://github.com/morris-lab/celloracleCellOracle is a Python library for performing in silico gene perturbation analyses using single-cell omics data and Gene Regulatory Network (GRN) models to predict effects on cell identity. It supports a wide range of species and reference genomes, including Human (hg38, hg19), Mouse (mm39, mm10, mm9), and others. The library can be installed via PyPI, conda, or a pre-built Docker image (kenjikamimoto126/celloracle_ubuntu).
What's inside CellOracle
- CellOracle is a Python library designed for in silico gene perturbation analysis. It utilizes single-cell omics data combined with gene regulatory network (GRN) models to simulate the effects of gene perturbations on cell identity.
Overview of CellOracle
masterCellOracle is a Python library designed for in silico gene perturbation analyses. It leverages single-cell omics data and Gene Regulatory Network (GRN) models to predict the effects of gene perturbations on cell identity.Overview of the CellOracle analysis workflow
masterCellOracle's workflow is divided into two main stages: performing the core analysis and preparing the necessary input data.
1. Main Analysis
- GRN Model Construction & Network Analysis: Constructing sample-specific Gene Regulatory Network (GRN) models and performing network analyses using graph theory.
- In silico Gene Perturbation: Performing gene perturbation analysis using the constructed GRN models.
2. Input Data Preparation
CellOracle is NOT a preprocessing pipeline for scRNA-seq or scATAC-seq data. Users must prepare their data using external tools before applying CellOracle. The workflow includes:
- scRNA-seq Preprocessing: Preparing single-cell RNA sequencing data.
- Base-GRN Preparation: Preparing input data for TF (Transcription Factor) motif scanning.
- TF Motif Scanning: Running the motif scan pipeline to construct the base-GRN.
It is highly recommended to start with the provided demo datasets to familiarize yourself with the functions before applying them to your own data.
System requirements for CellOracle
masterBefore installing, ensure your system meets the following requirements:
- Operating System: macOS or Linux are highly recommended.
- Windows: Not supported. While installation via Windows Subsystem for Linux (WSL) is possible, it is not recommended due to extremely slow calculation speeds and no official support.
- Memory: 16 GB or more. Memory usage scales with scRNA-seq dataset size; in silico perturbation may require significant memory.
- CPU: Core i5 or better. CellOracle's GRN inference supports multicore calculations to speed up processing.
- Operating System: macOS or Linux are highly recommended.
Understand the CellOracle License terms
masterCellOracle is provided under a modified Apache License Version 2.0.
Usage Restrictions:
- Non-commercial academic purposes: Permitted under the Apache License terms provided.
- Commercial use: Any use other than non-commercial academic purposes (including commercial use) requires explicit permission from the Morris lab.
Copyright 2020 Kenji Kamimoto, Christy Hoffmann, Samantha Morris.
Explore the core celloracle module
masterThecelloraclemodule contains the primary custom classes used for cell oracle operations. You can access the main API surface through this module to perform core tasks in the library.Overview of Base GRN construction options
masterCellOracle supports four primary methods for constructing a Base Gene Regulatory Network (GRN), which serves as the foundation for subsequent analysis. Depending on your available data, you can choose one of the following:
- scATAC-seq data (Option 1): Use single-cell ATAC-seq data to identify accessible promoter/enhancer DNA sequences. This typically involves identifying active peaks (e.g., using Cicero) and then annotating them to genes.
- Bulk ATAC-seq data (Option 2): Use bulk ATAC-seq data to obtain accessible promoter/enhancer sequences.
- Promoter Database (Option 3): Use pre-built promoter base GRNs. CellOracle provides these for 10 different species, which can be loaded using the CellOracle data loading functions.
- User-supplied TF-target list (Option 4): Construct the GRN using a custom list of Transcription Factor (TF) to target gene relationships provided by the user.
Automatic data downloading in CellOracle
masterStarting from version 0.10.5, CellOracle includes a refactored data loading function. If required data is not found in the localcelloraclelibrary directory, it will be automatically downloaded from GitHub.Getting started with CellOracle demo data
masterIf you are running CellOracle for the first time, the recommended path is to follow the
networkanalysistutorial first, followed by thesimulationtutorial.CellOracle provides demo datasets that can be loaded directly within the tutorial notebooks. These datasets allow you to reproduce results similar to those shown in the CellOracle bioRxiv preprint.
Demo Data Components:
- scRNA-seq data: Hematopoiesis dataset (Paul et al., 2015).
- Base-GRN: Generated from the Mouse sci-ATAC-seq Atlas.
By using these demo datasets, you can skip the manual data preparation steps and immediately begin exploring GRN construction and perturbation simulations.
Build a custom CellOracle Docker image
masterThe official CellOracle Docker image is built using a Dockerfile. You can create your own custom environment by modifying the existing Dockerfile found in the repository:
https://github.com/morris-lab/CellOracle/blob/master/other_files/DockerfileNote: Custom environments are maintained at the user's own responsibility.
Prepare scRNA-seq data for CellOracle analysis
masterBefore performing CellOracle analysis, you must preprocess your scRNA-seq data and format it as an
anndataobject. CellOracle does not perform the initial scRNA-seq preprocessing itself; it consumes the output of preprocessing tools like Scanpy or Seurat.Requirements
- The final data must be an
anndataobject. - If using Scanpy: Follow standard Scanpy workflows to generate an
anndataobject. - If using Seurat: You must convert your Seurat object into an
anndataobject. CellOracle provides Python and Command-Line APIs specifically for this conversion (refer to the CellOracle API documentation for conversion methods).
- The final data must be an
Construct a base GRN using transcription factor binding motif scan
masterAfter identifying accessible promoter/enhancer DNA regions (e.g., via ATAC-seq), you can construct a base Gene Regulatory Network (GRN) by scanning regulatory genomic sequences for Transcription Factor (TF) binding motifs. This base GRN represents a list of potential TF-target gene connections, which serves as the foundation for subsequent GRN inference steps.
Detailed implementation steps are provided in the following notebook:
../notebooks/02_motif_scan/02_atac_peaks_to_TFinfo_with_celloracle_20200801.ipynb