You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Humanize documentation tone and remove AI-style phrasing
Rewrite prose in READMEs, tutorials, and supporting docs to read more
naturally and remove AI-style formatting (em dashes, decorative emoji).
Code, commands, workflows, and diagrams are unchanged.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
End-to-end single-cell RNA-seq analysis pipeline following **[scverse best practices](https://www.sc-best-practices.org)**. Reproducible, containerised, and fully automated with Snakemake.
8
+
A Snakemake workflow for single-cell RNA-seq analysis following [scverse best practices](https://www.sc-best-practices.org). It covers QC, doublet detection, normalization, batch correction, clustering, marker genes, annotation, and optional trajectory analysis.
9
9
10
10
---
11
11
12
-
## 📋 Table of Contents
12
+
## Table of Contents
13
13
14
14
-[Pipeline overview](#pipeline-overview)
15
15
-[Quick start](#quick-start)
@@ -85,7 +85,7 @@ open results/report.html # or xdg-open on Linux
85
85
| Tool | Version | Install |
86
86
|------|---------|---------|
87
87
| conda / mamba | any |[miniforge](https://github.com/conda-forge/miniforge)|
88
-
| Snakemake |≥ 8.0 | included in `envs/scrna.yaml`|
88
+
| Snakemake |>= 8.0 | included in `envs/scrna.yaml`|
89
89
| Python | 3.11 | included |
90
90
| R + scDblFinder | optional |`envs/r_env.yaml`|
91
91
@@ -128,9 +128,9 @@ A tab-separated file with one row per sample:
128
128
129
129
| Column | Required | Description |
130
130
|--------|----------|-------------|
131
-
|`sample`|✅| Unique sample identifier |
132
-
|`path`|✅| Path to `.h5ad`, `.h5`, or 10X MEX directory |
133
-
|`batch`|✅| Batch label (use same value if single batch) |
131
+
|`sample`|yes| Unique sample identifier |
132
+
|`path`|yes| Path to `.h5ad`, `.h5`, or 10X MEX directory |
133
+
|`batch`|yes| Batch label (use same value if single batch) |
134
134
|`condition`| optional | Experimental condition for DE |
| ComBat | Simple, interpretable | Assumes linear effects only |
316
316
317
-
> **Skip if you have a single sample.** Over-integration is a real risk — if batches are already well-mixed, skip this step.
317
+
> **Skip if you have a single sample.** Over-integration is a real risk - if batches are already well-mixed, skip this step.
318
318
319
319
**Diagnostic**: Compare UMAP coloured by batch before vs after correction. After correction, cells should be interleaved without losing biological clusters.
320
320
321
321
---
322
322
323
-
### Step 05 — Neighbor Graph & UMAP
323
+
### Step 05 - Neighbor Graph & UMAP
324
324
325
325
**Purpose**: Embed cells in 2D for visualization.
326
326
327
327
**kNN graph**: Finds `n_neighbors` nearest cells in PCA space. This graph is the foundation for both UMAP and Leiden clustering.
328
328
329
329
**UMAP parameters**:
330
-
-`n_neighbors` (15): higher → more global structure; lower → more local
331
-
-`min_dist` (0.3): lower → tighter clusters; higher → more spread
330
+
-`n_neighbors` (15): higher -> more global structure; lower -> more local
331
+
-`min_dist` (0.3): lower -> tighter clusters; higher -> more spread
332
332
333
-
> ⚠️**UMAP is for visualization only.** Distances in UMAP space are not biologically meaningful. Two clusters that look close may not be transcriptionally similar.
333
+
> Note:**UMAP is for visualization only.** Distances in UMAP space are not biologically meaningful. Two clusters that look close may not be transcriptionally similar.
334
334
335
335
---
336
336
337
-
### Step 06 — Leiden Clustering
337
+
### Step 06 - Leiden Clustering
338
338
339
339
**Purpose**: Group cells into discrete clusters.
340
340
341
341
The pipeline runs Leiden at 6 resolutions and selects the best by **silhouette score** (measures how well-separated clusters are in PCA space).
342
342
343
343
> **Resolution guidance**:
344
-
> - Start with 0.4–0.8 for most datasets
345
-
> - More cells → can use higher resolution
344
+
> - Start with 0.4-0.8 for most datasets
345
+
> - More cells -> can use higher resolution
346
346
> - Check: do clusters make biological sense? Is the silhouette curve clearly peaked?
347
347
348
348
Inspect `figures/01_umap_all_resolutions.png` to see how resolution affects cluster granularity.
349
349
350
350
---
351
351
352
-
### Step 07 — Marker Genes & DE
352
+
### Step 07 - Marker Genes & DE
353
353
354
354
**A) Cluster markers** (Wilcoxon one-vs-rest):
355
-
- Non-parametric, robust to zero-inflation
355
+
- Non-parametric, stable with zero-inflation
356
356
- Recommended by scverse for scRNA-seq
357
-
- Results filtered by log2FC ≥ 0.25 and fraction expressing ≥ 10%
357
+
- Results filtered by log2FC >= 0.25 and fraction expressing >= 10%
0 commit comments