Skip to content

Commit 2db7d02

Browse files
challagandlaclaude
andcommitted
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>
1 parent bfe1fa8 commit 2db7d02

3 files changed

Lines changed: 50 additions & 50 deletions

File tree

README.md

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# 🧬 scRNA-seq Analysis Pipeline
1+
# scRNA-seq Analysis Pipeline
22

3-
[![CI](https://github.com/your-org/scrna-pipeline/actions/workflows/ci.yml/badge.svg)](https://github.com/your-org/scrna-pipeline/actions)
3+
[![CI](https://github.com/challagandla/oracle-scrna-seq/actions/workflows/ci.yml/badge.svg)](https://github.com/challagandla/oracle-scrna-seq/actions)
44
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
5-
[![Snakemake](https://img.shields.io/badge/snakemake-≥8.0-green.svg)](https://snakemake.github.io)
5+
[![Snakemake](https://img.shields.io/badge/snakemake-%3E%3D8.0-green.svg)](https://snakemake.github.io)
66
[![Python](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org)
77

8-
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.
99

1010
---
1111

12-
## 📋 Table of Contents
12+
## Table of Contents
1313

1414
- [Pipeline overview](#pipeline-overview)
1515
- [Quick start](#quick-start)
@@ -85,7 +85,7 @@ open results/report.html # or xdg-open on Linux
8585
| Tool | Version | Install |
8686
|------|---------|---------|
8787
| 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` |
8989
| Python | 3.11 | included |
9090
| R + scDblFinder | optional | `envs/r_env.yaml` |
9191

@@ -128,9 +128,9 @@ A tab-separated file with one row per sample:
128128

129129
| Column | Required | Description |
130130
|--------|----------|-------------|
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) |
134134
| `condition` | optional | Experimental condition for DE |
135135
| `description` | optional | Free-text description |
136136

@@ -216,16 +216,16 @@ snakemake --use-conda --cores 8 \
216216

217217
## Step-by-Step Guide
218218

219-
### Step 00 Quality Control
219+
### Step 00 - Quality Control
220220

221221
**Purpose**: Remove low-quality cells (empty droplets, dying cells, debris) and lowly-expressed genes.
222222

223223
**Key outputs**:
224-
- `figures/01_knee_plot.png` Barcode-rank plot; the "knee" separates real cells from empty droplets
225-
- `figures/02_qc_violin_before.png` Distribution of all QC metrics pre-filtering
226-
- `figures/03_qc_histograms.png` Histograms with MAD-based threshold lines overlaid
227-
- `figures/04_counts_vs_genes.png` Scatter plot coloured by MT%; dying cells cluster bottom-left with high MT%
228-
- `qc_stats.json` Machine-readable before/after statistics
224+
- `figures/01_knee_plot.png` - Barcode-rank plot; the "knee" separates real cells from empty droplets
225+
- `figures/02_qc_violin_before.png` - Distribution of all QC metrics pre-filtering
226+
- `figures/03_qc_histograms.png` - Histograms with MAD-based threshold lines overlaid
227+
- `figures/04_counts_vs_genes.png` - Scatter plot coloured by MT%; dying cells cluster bottom-left with high MT%
228+
- `qc_stats.json` - Machine-readable before/after statistics
229229

230230
**Algorithm** (MAD = Median Absolute Deviation):
231231
```
@@ -247,9 +247,9 @@ qc:
247247

248248
---
249249

250-
### Step 01 Doublet Detection
250+
### Step 01 - Doublet Detection
251251

252-
**Purpose**: Identify and remove doublets droplets that captured 2+ cells. Doublets appear as fake "intermediate" cell types and inflate cluster counts.
252+
**Purpose**: Identify and remove doublets - droplets that captured 2+ cells. Doublets appear as fake "intermediate" cell types and inflate cluster counts.
253253

254254
**Methods**:
255255

@@ -264,15 +264,15 @@ qc:
264264
265265
---
266266

267-
### Step 02 Normalization
267+
### Step 02 - Normalization
268268

269269
**Purpose**: Remove technical variation in library size (sequencing depth) so cells are comparable.
270270

271271
**Methods**:
272272

273273
| Method | Steps | Best for |
274274
|--------|-------|----------|
275-
| `log` (default) | Divide by library size → ×10,000 log1p | Most datasets |
275+
| `log` (default) | Divide by library size -> x10,000 -> log1p | Most datasets |
276276
| `scran` | Pooling-based size factors | Low library size variation, many zeros |
277277

278278
Raw integer counts are always preserved in `adata.layers["counts"]` for:
@@ -284,7 +284,7 @@ Raw integer counts are always preserved in `adata.layers["counts"]` for:
284284

285285
---
286286

287-
### Step 03 HVG Selection & PCA
287+
### Step 03 - HVG Selection & PCA
288288

289289
**Purpose**: Select informative genes and compress expression space.
290290

@@ -295,66 +295,66 @@ Raw integer counts are always preserved in `adata.layers["counts"]` for:
295295
- Non-HVGs are retained in the object but excluded from PCA
296296

297297
**Scaling**: HVGs are zero-mean, unit-variance scaled (capped at 10) before PCA.
298-
> Do NOT use scaled data for visualization or DE. Only for PCA.
298+
> Do not use scaled data for visualization or DE. Only for PCA.
299299
300300
**Choosing n_pcs** (from elbow plot):
301301
- Look for where variance ratio stops decreasing sharply ("elbow")
302302
- Rule of thumb: use PCs explaining 80% cumulative variance
303-
- Typical range: 2050 PCs
303+
- Typical range: 20-50 PCs
304304

305305
---
306306

307-
### Step 04 Batch Correction
307+
### Step 04 - Batch Correction
308308

309309
**Purpose**: Remove technical batch effects while preserving biological variation.
310310

311311
| Method | Pros | Cons |
312312
|--------|------|------|
313313
| Harmony | Fast (seconds), no retraining, works well | May over-integrate |
314-
| scVI | Most powerful, probabilistic | Slow (minuteshours), needs counts |
314+
| scVI | Most flexible, probabilistic | Slow (minutes-hours), needs counts |
315315
| ComBat | Simple, interpretable | Assumes linear effects only |
316316

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.
318318
319319
**Diagnostic**: Compare UMAP coloured by batch before vs after correction. After correction, cells should be interleaved without losing biological clusters.
320320

321321
---
322322

323-
### Step 05 Neighbor Graph & UMAP
323+
### Step 05 - Neighbor Graph & UMAP
324324

325325
**Purpose**: Embed cells in 2D for visualization.
326326

327327
**kNN graph**: Finds `n_neighbors` nearest cells in PCA space. This graph is the foundation for both UMAP and Leiden clustering.
328328

329329
**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
332332

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.
334334
335335
---
336336

337-
### Step 06 Leiden Clustering
337+
### Step 06 - Leiden Clustering
338338

339339
**Purpose**: Group cells into discrete clusters.
340340

341341
The pipeline runs Leiden at 6 resolutions and selects the best by **silhouette score** (measures how well-separated clusters are in PCA space).
342342

343343
> **Resolution guidance**:
344-
> - Start with 0.40.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
346346
> - Check: do clusters make biological sense? Is the silhouette curve clearly peaked?
347347
348348
Inspect `figures/01_umap_all_resolutions.png` to see how resolution affects cluster granularity.
349349

350350
---
351351

352-
### Step 07 Marker Genes & DE
352+
### Step 07 - Marker Genes & DE
353353

354354
**A) Cluster markers** (Wilcoxon one-vs-rest):
355-
- Non-parametric, robust to zero-inflation
355+
- Non-parametric, stable with zero-inflation
356356
- 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%
358358

359359
**B) Condition DE** (pseudobulk, requires biological replicates):
360360
```yaml
@@ -363,13 +363,13 @@ markers:
363363
group1: "control"
364364
group2: "treated"
365365
```
366-
Pseudobulk aggregates counts per sample, then tests with DESeq2 the only statistically valid approach when you have replicates.
366+
Pseudobulk aggregates counts per sample, then tests with DESeq2 - the only statistically valid approach when you have replicates.
367367
368-
> **Do not run per-cell DE between conditions** (inflated degrees of freedom). Always use pseudobulk.
368+
> **Do not run per-cell DE between conditions** (inflated degrees of freedom). Always use pseudobulk.
369369
370370
---
371371
372-
### Step 08 Cell Type Annotation
372+
### Step 08 - Cell Type Annotation
373373
374374
Three complementary approaches:
375375
@@ -386,11 +386,11 @@ Three complementary approaches:
386386
```
387387
Then set `manual_tsv: "config/my_annotations.tsv"`.
388388
389-
**Composition plot**: `figures/06_composition_barplot.png` shows cell type proportions per sample useful for identifying disease-associated compositional shifts.
389+
**Composition plot**: `figures/06_composition_barplot.png` shows cell type proportions per sample - useful for identifying disease-associated compositional shifts.
390390

391391
---
392392

393-
### Step 09 Trajectory (optional)
393+
### Step 09 - Trajectory (optional)
394394

395395
**PAGA** (any dataset):
396396
```yaml
@@ -524,7 +524,7 @@ Please run tests before submitting: `pytest tests/ -v`
524524

525525
If you use this pipeline, please cite the underlying tools:
526526

527-
- **scverse**: Virshup et al. (2023) *Nature Biotechnology* anndata, scanpy
527+
- **scverse**: Virshup et al. (2023) *Nature Biotechnology* - anndata, scanpy
528528
- **Leiden algorithm**: Traag et al. (2019) *Scientific Reports*
529529
- **Harmony**: Korsunsky et al. (2019) *Nature Methods*
530530
- **scrublet**: Wolock et al. (2019) *Cell Systems*
@@ -539,4 +539,4 @@ If you use this pipeline, please cite the underlying tools:
539539

540540
## License
541541

542-
MIT see [LICENSE](LICENSE)
542+
MIT - see [LICENSE](LICENSE)

docs/github_push.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ git remote add origin git@github.com:<your-username>/scrna-pipeline.git
3939
git push -u origin main
4040
```
4141

42-
## After adding GitHub remote update README badge
42+
## After adding GitHub remote - update README badge
4343

44-
Edit `README.md` line 3 and replace `your-org` with your GitHub username:
44+
The README badge already points at `challagandla/oracle-scrna-seq`. If you fork the repo, update the badge owner/repo path after pushing:
4545
```
4646
[![CI](https://github.com/<your-username>/scrna-pipeline/actions/workflows/ci.yml/badge.svg)]
4747
```

docs/parameters.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ All parameters are set in `config/config.yaml`.
1919
| `mad_counts` | `5` | MADs for total counts (log-scale). Lower = stricter. |
2020
| `mad_genes` | `5` | MADs for gene counts (log-scale). |
2121
| `mad_mt` | `3` | MADs for MT% (raw). More stringent than counts. |
22-
| `mt_hard` | `8` | Hard MT% ceiling. Raise to 1015 for neurons. |
23-
| `min_cells` | `20` | Gene must appear in N cells. |
22+
| `mt_hard` | `8` | Hard MT% ceiling. Raise to 10-15 for neurons. |
23+
| `min_cells` | `20` | Gene must appear in >= N cells. |
2424
| `min_counts` | `500` | Hard floor for total counts per cell. |
2525
| `min_genes` | `200` | Hard floor for detected genes per cell. |
2626

@@ -42,7 +42,7 @@ All parameters are set in `config/config.yaml`.
4242

4343
| Parameter | Default | Description |
4444
|-----------|---------|-------------|
45-
| `n_top_genes` | `2000` | HVGs to select. 15003000 is typical. |
45+
| `n_top_genes` | `2000` | HVGs to select. 1500-3000 is typical. |
4646
| `flavor` | `seurat_v3` | HVG method: `seurat_v3`, `seurat`, `cell_ranger`. |
4747
| `n_pcs` | `50` | PCs to compute. |
4848
| `n_pcs_use` | `30` | PCs to use downstream. See elbow plot. |
@@ -59,9 +59,9 @@ All parameters are set in `config/config.yaml`.
5959

6060
| Parameter | Default | Description |
6161
|-----------|---------|-------------|
62-
| `n_neighbors` | `15` | kNN graph neighbors. 1050. |
62+
| `n_neighbors` | `15` | kNN graph neighbors. 10-50. |
6363
| `metric` | `euclidean` | Distance metric for kNN. |
64-
| `min_dist` | `0.3` | UMAP: controls cluster tightness. 0.10.8. |
64+
| `min_dist` | `0.3` | UMAP: controls cluster tightness. 0.1-0.8. |
6565
| `spread` | `1.0` | UMAP: scale of embedded space. |
6666
| `use_rep` | `""` | Auto-set from batch method. Override if needed. |
6767

@@ -91,7 +91,7 @@ All parameters are set in `config/config.yaml`.
9191
| `markers_json` | `""` | Path to `{cell_type: [gene1,...]}` JSON. `""` = built-in PBMC. |
9292
| `celltypist` | `false` | Run CellTypist automated classification. |
9393
| `celltypist_model` | `Immune_All_Low.pkl` | CellTypist model name. See [models](https://www.celltypist.org/models). |
94-
| `manual_tsv` | `""` | Path to clustercell_type TSV. `""` = skip. |
94+
| `manual_tsv` | `""` | Path to cluster->cell_type TSV. `""` = skip. |
9595

9696
## trajectory
9797

0 commit comments

Comments
 (0)