.qmd notebooks you open in RStudio and run chunk-by-chunk on the small ifnb dataset.nano or emacs are fine for quick edits, but they don’t scale to a real project.
A good editor shows you the whole directory at once, color-codes your code, and catches mistakes early.
You will spend hours in your editor. A small upfront investment pays back every day.
Tip
Open the whole project folder, not a single file. VS Code is at its best when it can see your entire project at once.
.R, .qmd, .py, .sh, …).The Command Palette is how you find anything VS Code can do.
Cmd-Shift-P (Mac) or Ctrl-Shift-P (Windows / Linux).Cmd-Shift-P Developer: Reload WindowTip
When you can’t remember where a setting lives, open the Command Palette and just start typing what you want.
| Action | macOS | Windows / Linux |
|---|---|---|
| Open Command Palette | Cmd-Shift-P |
Ctrl-Shift-P |
| Toggle comments | Cmd-/ |
Ctrl-/ |
| Indent code block | Cmd-] |
Ctrl-] |
| Un-indent code block | Cmd-[ |
Ctrl-[ |
Note
The two besties: toggling comments and block indent/unindent. You’ll reach for these constantly when cleaning up code.
| Action | macOS | Windows / Linux |
|---|---|---|
| Save file | Cmd-S |
Ctrl-S |
| Find (this file) | Cmd-F |
Ctrl-F |
| Search (whole project) | Cmd-Shift-F |
Ctrl-Shift-F |
Tip
If the shortcut requires a (`), it is usually above the Tab key — not an apostrophe.
No separate Terminal window needed!
Run R scripts, render Quarto documents, or use the command line right where you’re editing.
Open a new terminal from Terminal ▸ New Terminal.
Add more terminal tabs with the + on the right of the current terminal.
This will be very valuable when we are running R and bash scripts on Talapas
| Open Terminal | Ctrl-CAPS-` |
Ctrl-CAPS-` |
| Split Terminal | Ctrl-\ |
Ctrl-\ |
Note
You can always add or remove extensions later. Start with this short list and grow it as you go.
Open the Extensions tab, search for each, and click Install:
.qmd notebooks (our tutorials) directly in VS Code.Tip
Search “ssh” in the Extensions tab to find the Remote – SSH family quickly, and “quarto” / “r” for the language tools.
Cmd/Ctrl-/) and indent/un-indent (Cmd/Ctrl-[ ]).Ctrl-CAPS-`) runs your code without leaving the editor.Note
We will revisit VS Code when we connect it to a remote cluster.
Connecting VS Code to Talapas over Remote-SSH, exploring the cluster interactively, and submitting SLURM batch jobs are all covered on Friday morning — not today.
➡️ See Lecture 09 — VS Code & SLURM Basics on Talapas and hands-on in Tutorial 09 for the full walkthrough. Full reference: Chapter 9 — VS Code & SLURM Basics on Talapas.
ifnb (~24k cells) fine; real datasets (hundreds of thousands of cells, or raw FASTQs through Cell Ranger) need the cluster’s CPUs, RAM, and storage.Tip
Bulk is cheap, mature, and statistically well-understood. If your question is “does gene X change with treatment, averaged over the tissue?” — bulk is still the right tool.
n = cells is the most common mistake in the fieldBulk: nearly every gene is detected in every sample (~5% zeros)
Smart-seq2: ~50–60% zeros — moderate dropout but rich per-cell signal
10x 3’ v3 droplet: ~90–95% zeros — most (cell, gene) pairs are zero
The implication for analysis: every step has to handle counts that are mostly zero.
That’s why we have specialized normalisation (SCTransform), HVG selection, and graph-based clustering instead of the bulk RNA-seq toolkit.
| Category | Examples | Strengths | Trade-offs |
|---|---|---|---|
| Plate-based, full-length | Smart-seq2/3 | Full transcript coverage, isoforms, high sensitivity | Low throughput, more expensive per cell |
| Droplet-based, 3’/5’ | 10x Genomics Chromium, Drop-seq, inDrops | High throughput (1k–100k+ cells) | 3’ or 5’ only, shallower per cell |
| Combinatorial barcoding | Parse Evercode, SPLiT-seq | No specialized instrument, fixable samples | Protocol complexity |
| Nuclei (snRNA-seq) | 10x Nuclei | Works on frozen / difficult tissues | Fewer transcripts, no cytoplasmic RNA |
Note
10x Chromium 3’ is the workshop default — the assay used by the workshop’s ifnb dataset. Most conceptual ideas generalize.
Even within 10x, there are two capture chemistries, and the choice constrains what you can study:
| 3′ / 5′ gene expression | Flex (probe capture) | |
|---|---|---|
| How RNA is captured | polyA tail → reverse transcription | hybridization probes against a fixed gene panel (microarray-like) |
| Sample state | fresh / cryopreserved (live) cells or nuclei | fixed cells/nuclei, incl. FFPE |
| Species | any species with a transcriptome | human & mouse only (probe panels) |
| Best for | non-model systems, novel/unannotated genes | banked clinical/fixed material, high multiplexing |
Warning
Probe panels can’t see what they don’t target. Flex only quantifies the genes on the panel, and panels exist only for human and mouse — so for non-model organisms the polyA chemistry is effectively the only option (and it carries the 3′-annotation caveat on the next slide).
Droplet microfluidics is not the only way to barcode single cells. Combinatorial split-pool barcoding (Rosenberg et al. 2018, SPLiT-seq; commercialized as Parse Biosciences Evercode) labels cells by repeated rounds of split → barcode → pool instead of one-cell-one-droplet:
Note
Other instrument-light approaches exist too — e.g. Fluent BioSciences PIP-seq (particle-templated emulsification, Clark et al. 2023) makes droplets without a microfluidic controller.
| 10x Chromium | Parse Evercode | |
|---|---|---|
| Principle | droplet microfluidics (GEMs) | combinatorial split-pool barcoding |
| Instrument | dedicated controller | none (plates) |
| Input | fresh/cryo cells or nuclei; live preferred (polyA) | fixed cells or nuclei |
| Scaling | per-channel; multiplex to lower cost | add barcode rounds → up to millions of cells / hundreds of samples |
| Multi-omics | RNA, ATAC, protein, V(D)J, CRISPR | RNA, immune, CRISPR (no ATAC) |
| Cost / labor | higher reagent cost, less bench labor | cheaper reagents, more bench labor |
Tip
There is no single “best” platform — match it to the question: instrument-free + fixable + many samples → Parse; multi-omics (esp. ATAC/protein) or a turnkey instrument → 10x; non-model species → polyA chemistry either way.
Warning
Report your platform and chemistry (3′ vs 5′ vs Flex, cells vs nuclei, multiplexing scheme) in methods. Downstream defaults (ambient correction, doublet rate, mito thresholds, even whether a cluster appears) all depend on them.
Tip
A 4-step mental compression. From here on out, every chunk of the pipeline (a) cleans something, (b) puts things on a sensible scale, (c) finds structure, (d) names that structure with biology.
ifnb (Kang et al. 2017)muscData::Kang18_8vs8().muscData::Kang18_8vs8() — no separate download, no SeuratData sign-in.ind) are carried in metadata — enabling proper pseudobulk DE (Tutorial 06) and differential abundance (Tutorial 08) with real biological replicates.Note
The older SeuratData ifnb has ~14k cells. The muscData build used here loads the full ~29,000-cell object (no filtering applied), of which ~24,000 are demuxlet-annotated singlets across all eight donors. After the QC filters in Tutorial 01 (nFeature_RNA > 200 & < 2500, percent.mt < 5, scDblFinder singlets) you’ll retain ~23,000 post-QC cells.
This dataset comes from early (3’ v1) 10x chemistry, so its per-cell depth and capture are lower than the generic 3’ v3 figures used in the capture/sparsity examples above — expect fewer UMIs and genes per cell than a current run.
Single Cell RNA-seq Workshop · Lecture 00 — Overview & Setup