-
Notifications
You must be signed in to change notification settings - Fork 78
Single Cell RNA Seq Analysis
This workshop will focus on the analysis of single-cell RNA-seq data starting from the raw counts matrices. You'll learn about quality control of the raw data, normalization, feature selection, dimensionality reduction, clustering, finding marker genes, and batch correction. You'll analyze data using R.
The discussions are organized in three sessions:
-
Session 1: Load the data, quality control, normalization, feature selection, dimensionality reduction.
-
Session 2: Dimensionality reduction (continued), clustering, finding marker genes.
-
Session 3: Advanced discussion on normalization, differential analysis, batch-correction, Q&A.
Note: Attendance in all three sessions is highly recommended. Each session builds upon prior sessions.
Required experience:
- Familiarity with R and RStudio (e.g., reading in files, working with lists and dataframes)
- Some exposure to RNA-seq datasets
This is an advanced workshop in the RNA-Seq Analysis series. Prior experience with RNA-Seq analysis is required. See introductory and intermediate workshops in the RNA-Seq Analysis series.
The slides are here .
- There is a zip file with code and data at this link.
- Open the link, press the download button (usually on the top right corner), and select “Direct Download” if a menu pops up.
- The zip file download should start.
- Unzip the zip file.
- The slides for this session can be found here
- The Rmarkdown file along with the support data and R code can downloaded in this folder.
- Follow the instructions above to unzip this file.
Before the workshop, please ensure that R and RStudio are installed, and all required packages are set up. Completing these steps will ensure a smooth experience during the hands-on sessions.
-
Install the following packages in RStudio:
# Core packages install.packages("tidyverse") # Data handling and visualization install.packages("Seurat") # Single-cell RNA-seq analysis install.packages("sctransform") # Normalization install.packages("patchwork") # Plot arrangement install.packages("future") # Parallel processing of tasks # Check Seurat version library(Seurat) packageVersion("Seurat") # Should be 4.0 or higher # If prompted to install from source, type 'y' to confirm # Bioconductor dependencies if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("glmGamPoi") # GitHub dependencies (requires devtools) if (!requireNamespace("devtools", quietly = TRUE)) install.packages("devtools") devtools::install_github("gladstone-institutes/clustOpt") devtools::install_github("gladstone-institutes/LODopt") # Optional: For handling large datasets efficiently BiocManager::install("BPCells") # Verify installations library(clustOpt) packageVersion("clustOpt") library(LODopt) packageVersion("LODopt")
-
Download and open the hands-on materials
- Download here
- Unzip the folder and open
hands_on_component.Rmdin RStudio.
-
Click the “Knit” button in RStudio.
If all installations were successful, the R Markdown file will compile into an HTML report that matcheshands_on_component_output.htmlincluded in the materials.
Note: It may take several minutes to run through all steps.
If you encounter installation issues with clustOpt or LODopt, refer to the official troubleshooting guides:
If you have already installed R, RStudio, Seurat, and tidyverse, you only need to install the additional packages below.
-
Install Bioconductor packages:
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("muscat") BiocManager::install("SummarizedExperiment") BiocManager::install("harmony")
-
Install additional R packages:
install.packages("magrittr") install.packages("lme4") install.packages("gdata") install.packages("ssizeRNA")
If prompted to install from source, type ‘y’ to confirm.
-
Download and open
- Session 3 materials
- Open
Session3.Rmdin RStudio.
-
Knit the file.
If the setup is correct, RStudio will generate an HTML document namedSession3.html, which matches the example provided.
Again, this process may take several minutes.
- Restart R after installing multiple packages to ensure all dependencies load correctly.
- If a package fails to install, copy the exact error message and email us before the workshop or bring it to the first workshop session. We will troubleshoot together.
You can access these materials remotely at any time and go through them at your own pace. Here's how:
- Download the materials for Sessions 1-3 as described above. Study the slide deck for a review of current practices in scRNA-seq analysis (Jan, 2023).
- Published benchmarks for different classes methods/analyses on single-cell RNA-seq data.