Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Single-Cell RNA-Seq Analysis Training

This repository contains a comprehensive workflow for processing and analyzing single-cell RNA sequencing (scRNA-seq) data using Python. The tutorials are based on the SIB Swiss Institute of Bioinformatics training materials.

Dataset Context

The analysis is primarily conducted on Peripheral Blood Mononuclear Cell (PBMMC) and ETV6-RUNX1 (a common leukemia fusion gene) samples. This data allows for the exploration of diverse immune cell populations, batch effect correction, and trajectory modeling.

The data used in this workflow comes from:

Caron, M., St-Onge, P., Sontag, T. et al. Single-cell analysis of childhood leukemia reveals a link between developmental states and ribosomal protein expression as a source of intra-individual heterogeneity. Sci Rep 10, 8079 (2020). https://doi.org/10.1038/s41598-020-64929-x

Data Access

The raw count matrices and FASTQ files can be downloaded here:

wget https://single-cell-transcriptomics-python.s3.eu-central-1.amazonaws.com/course_data.tar.gz
tar -xvf course_data.tar.gz
rm course_data.tar.gz

Data Structure

The course_data folder contains filtered feature-barcode matrices in .mtx format for 3 ETV6-RUNX1 samples and 3 PBMMC samples, along with example READS.

Notebooks overview

01: Cell Ranger QC & Filtering

Loads 10x Genomics data into AnnData objects. It covers the calculation of quality control metrics (mitochondrial, ribosomal, and hemoglobin gene percentages) and the application of thresholds to remove low-quality cells.

02: Normalization & Scaling

Implements Shifted Logarithm normalization and identifies highly variable genes. It also handles data scaling and assigns categorical cell cycle phases to cells.

03: Dimensionality Reduction

Explores PCA (Principal Component Analysis) to capture major variance and UMAP for non-linear visualization. Learn how to select the optimal number of PCs for downstream tasks.

04: Data Integration

Demonstrates the use of the Harmony algorithm to integrate samples from different batches, ensuring that clusters are formed by cell type rather than technical origin.

05: Clustering

Applies graph-based clustering using the Leiden algorithm. It explores how changing the "resolution" parameter affects the granularity of identified cell populations.

06: Annotation & Visualization

Focuses on identifying marker genes for clusters and performing cell type annotation. Includes a demonstration of Label Transfer (mapping labels from a reference to a new dataset) using sc.tl.ingest.

07: Gene Regulatory Analysis (pySCENIC)

Goes beyond expression to infer Gene Regulatory Networks (GRNs). It identifies regulons (transcription factors and their targets) and scores their activity across cells.

08: Trajectory Inference & Pseudotime

Models cellular development as a continuous path. It uses Diffusion Maps and Diffusion Pseudotime (DPT) to rank cells by their developmental maturity relative to a "root" cell.

09: RNA Velocity

Estimates the future state of individual cells by analyzing the ratio of unspliced vs. spliced mRNA transcripts, providing a "vector field" of cellular differentiation.

Installation & Setup

To run these notebooks, I used a Conda environment to manage dependencies, but of course you can use other alternatives.

  1. Create the environment:
conda env create -f environment.yml
  1. Activate the environment:
conda activate scrna-seq-env

Suggested Directory Structure

For the notebooks to work out-of-the-box with your data, I suggest organizing your repo like this:

.
├── 01_scrna_seq_analysis_tools_qc.ipynb
├── 02_scrna_seq_normalization_scaling.ipynb
├── ... (other notebooks)
├── course_data/           <-- Place the downloaded/extracted data here
├── environment.yml
└── README.md

About

This repository is a tutorial-like workflow to analyse Single-Cell RNA-Seq data

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages