mcDETECT tutorial: MERSCOPE analysis (step by step)
This tutorial follows the repository workflow for MERSCOPE data: transcript-based mcDETECT setup → granule detection → expression profiling → manual granule subtyping → WT vs AD granule density comparison → Isocortex neuropil subdomain analysis on a 50×50 grid with hard embeddings, row-normalized subtype vectors, and K-Means with k = 4.
Primary references: mcDETECT_package/mcDETECT/model.py, code/3_detection.py, code/benchmark/benchmark_subtyping.ipynb, code/7_neuropil_subdomains.ipynb.
Analysis roadmap
Prepare — transcript and auxiliary tables (coordinates, gene names, nucleus overlap, optional
cell_id).Initialize
mcDETECTwith platform type, marker lists, and numerical hyperparameters.Detect granules — optional rough pass, then fine pass with filters.
Profile granules into an
AnnDatacount matrix.Subtype manually — normalize expression, k-means, heatmap, map clusters to biology, derive a simple mixed/pure label.
Compare density WT vs AD by brain region using spots as spatial units.
Neuropil subdomains (Isocortex, 50×50) — hard
spot_embedding, row-wise normalization, K-Means k = 4.
See also the quick reference checklist.
Dataset-specific coordinate transforms and multi-setting benchmark loops are omitted here.
Pages
File |
Section |
|---|---|
What mcDETECT expects |
|
Step A — Construct |
|
Step B — Granule detection |
|
Step C — Profile granules |
|
Step D — Manual granule subtyping |
|
Step E — WT vs AD density |
|
Step F — Neuropil subdomains (Isocortex) |
|
Quick reference checklist |
Contributors: publishing workflow for this site (not part of the RTD build): maintainer/PUBLISHING_READTHEDOCS.md in the mcDETECT-tutorial repository.