Complete all steps below before the course day.
Virtual machine: 30-60 min download. Local install: 20-40 min, depending on your connection.
Tick each item as you complete it. All five must be done before the workshop starts.
There are two ways to get a working setup for the course. Pick one before doing anything else below — the rest of this guide branches depending on which you choose.
A ready-to-use Ubuntu 24.04 virtual machine with RStudio, the dataset, and every package from Block 0 already installed. Best if you do not normally use R, or do not want to troubleshoot installation issues on your own machine.
Install R, RStudio, and the packages directly on your own computer. Faster to run during the course (no virtualization overhead) and better if your computer has limited RAM.
Download link: [link to be posted in Google Classroom / shared Drive folder]. The file is a virtual machine image (~8 GB). You will need virtualization software installed first — VirtualBox (free) works on Windows, Mac, and Linux.
data/gse149689_subset_3k.rds. You open RStudio
inside the VM and the course notebook is ready to run.
Why it shows as "Ubuntu" if you don't know Linux: Ubuntu here is just the operating system that RStudio runs inside. You will only interact with RStudio, the same way you would on Windows or Mac. You do not need to know any Linux commands for this course.
If the VM window opens with a small or oddly cropped resolution, the screen-resolution button on the VM window toolbar does not always switch it directly. Change it from the settings menu instead:
The VM only runs as fast as the resources you give it. To change how much RAM or how many CPU cores it can use:
Skip this entire section if you are using the virtual machine from Step 1A.
Go to cran.r-project.org and choose your operating system.
After installation, open R and confirm the version:
R.version$major # should print "4" or higher R.version$minor # should print "3.0" or higher
Go to posit.co/download/rstudio-desktop and download the free Desktop version for your system.
Once installed, open RStudio. You should see four panels: Source (top left), Console (bottom left), Environment (top right), Files (bottom right).
Skip this entire section if you are using the virtual machine — every package below is already installed there.
Copy the code below into your RStudio console and run it. The first run may take 15 to 30 minutes depending on your connection. Packages that are already installed will be skipped automatically.
SingleCellExperiment, needed by the
doublet-detection step (scDblFinder) in Block 2.
If you installed packages before from an older version of this guide,
re-run the script below — it skips anything already installed and
only adds what is missing.
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
all_pkgs <- c(
"Seurat", "SeuratObject", "ggplot2", "patchwork",
"dplyr", "Matrix", "harmony", "scales", "ggrepel",
"SingleR", "celldex", "BiocParallel", "scDblFinder",
"SingleCellExperiment"
)
for (pkg in all_pkgs) {
if (!requireNamespace(pkg, quietly = TRUE)) {
message("Installing: ", pkg)
tryCatch(install.packages(pkg, quiet = TRUE),
error = function(e) NULL, warning = function(w) NULL)
if (!requireNamespace(pkg, quietly = TRUE)) {
message(" Trying BiocManager...")
tryCatch(
BiocManager::install(pkg, ask = FALSE, update = FALSE),
error = function(e) message(" FAILED: ", e$message),
warning = function(w) NULL
)
}
if (requireNamespace(pkg, quietly = TRUE))
message(" OK: ", pkg, " (", as.character(packageVersion(pkg)), ")")
else
message(" FAILED: ", pkg)
} else {
message("Already installed: ", pkg,
" (", as.character(packageVersion(pkg)), ")")
}
}
After the script finishes, run this to check everything is ready:
pkgs <- c("Seurat", "SeuratObject", "ggplot2", "patchwork",
"dplyr", "Matrix", "SingleR", "celldex",
"harmony", "scales", "ggrepel", "BiocParallel",
"scDblFinder", "SingleCellExperiment")
for (pkg in pkgs) {
ok <- requireNamespace(pkg, quietly = TRUE)
cat(sprintf(" %-22s %s\n", pkg, ifelse(ok, "OK", "MISSING")))
}
cat("\nSeurat version:", as.character(packageVersion("Seurat")), "\n")
# Must start with 5
Expected output:
| Package | Expected status |
|---|---|
| Seurat | OK (5.x.x) |
| SeuratObject | OK |
| ggplot2 | OK |
| patchwork | OK |
| dplyr | OK |
| Matrix | OK |
| SingleR | OK |
| celldex | OK |
| harmony | OK |
| scales | OK |
| ggrepel | OK |
| BiocParallel | OK |
| scDblFinder | OK |
| SingleCellExperiment | OK |
BiocManager::install("PACKAGE_NAME", force = TRUE)
# Then: Session > Restart R
library(ggplot2) is called a second time in the same session.
Always do Session > Restart R at the start of the course.
Skip this entire section if you are using the virtual machine — the
dataset is already saved at data/gse149689_subset_3k.rds there.
The dataset link is posted in Google Classroom under Data and Reference Materials. You can download it manually from the browser, or run the code below in R.
# Create the data folder if it does not exist
dir.create("data", showWarnings = FALSE)
# The FILE_ID is posted in Google Classroom
FILE_ID <- "1mCg4VD91qK7pg-zL1iYUUBFWBr7fmmCM"
options(timeout = 600)
download.file(
url = paste0(
"https://drive.google.com/uc?export=download&confirm=t&id=",
FILE_ID
),
destfile = "data/gse149689_subset_3k.rds",
mode = "wb"
)
Verify the download worked:
sobj <- readRDS("data/gse149689_subset_3k.rds")
print(sobj)
# Expected output:
# An object of class Seurat
# 524 features across 3000 samples within 2 assays
# Active assay: RNA (500 features)
# 1 other assay present: ADT
data/gse149689_subset_3k.rds in your project folder.
This workshop focuses on troubleshooting real problems in single-cell CITE-seq analysis. You will run code that produces errors on purpose and learn to diagnose and fix them.
| Block | Topic | Time |
|---|---|---|
| Block 0 | Setup (at home) | Pre-course |
| Block 1 | Foundations: scRNA-seq, CITE-seq, dataset | 0:00 to 0:30 |
| Block 2 | Object inspection and QC | 0:30 to 1:00 |
| Block 3 | Preprocessing | 1:00 to 1:55 |
| Break: 15 minutes | ||
| Block 4 | CITE-seq integrative analysis | 2:10 to 3:10 |
| Block 5 | Troubleshooting scenarios (groups) | 3:10 to 4:10 |
| Block 6 | Wrap-up and discussion | 4:10 to 4:50 |
install.packages("Seurat")
# Then Session > Restart R
packageVersion("Seurat") # confirm it now starts with 5
BiocManager::install("celldex", ask = FALSE)
# Then Session > Restart R
Install Rtools first from cran.r-project.org/bin/windows/Rtools. Choose the version that matches your R version. Then retry:
install.packages("Seurat")
install.packages("Seurat", type = "binary")
If that also fails, confirm you downloaded the ARM64 version of R from cran.r-project.org/bin/macosx.
Download the file manually through your browser from the Google Classroom link. Save it as:
your_project_folder/data/gse149689_subset_3k.rds
If the Drive link asks for login, the instructor needs to change the sharing setting to "Anyone with the link".
R.version$major), and the full error message.
The instructor will help before the course day.