← Về thư mục
Single-Cell RNA-seq Pipeline - Usage Guide
Overview
This workflow processes single-cell RNA-seq data from 10X Genomics Cell Ranger output to annotated cell types. It supports both Seurat (R) and Scanpy (Python) implementations.
Prerequisites
# R packages
install.packages(c('Seurat', 'ggplot2', 'dplyr'))
BiocManager::install(c('scDblFinder', 'SingleCellExperiment'))
# Python packages
pip install scanpy scrublet anndata
Quick Start
Tell your AI agent what you want to do:
- "Analyze my 10X single-cell data from start to finish"
- "Run the scRNA-seq pipeline on my PBMC data"
- "Cluster my single-cell data and find marker genes"
Example Prompts
Starting from Cell Ranger output
"I have filtered_feature_bc_matrix from Cell Ranger, analyze it"
"Load my 10X data and perform QC filtering"
"Process my scRNA-seq with Scanpy instead of Seurat"
Analysis steps
"Remove doublets from my single-cell data"
"Find clusters at different resolutions"
"What are the marker genes for cluster 3?"
Annotation
"Help me annotate cell types based on marker genes"
"Use SingleR for automated cell type annotation"
| Input |
Format |
Description |
| 10X data |
filtered_feature_bc_matrix/ |
Directory with matrix.mtx, barcodes.tsv, features.tsv |
| 10X H5 |
.h5 |
Alternatively, the HDF5 format |
What the Workflow Does
- Load Data - Read 10X matrix into Seurat/AnnData
- QC Filtering - Remove low-quality cells and doublets
- Normalization - SCTransform or log-normalization
- Feature Selection - Find highly variable genes
- Dimension Reduction - PCA and UMAP
- Clustering - Graph-based clustering
- Markers - Find cluster-specific genes
- Annotation - Assign cell type labels
Seurat vs Scanpy
| Feature |
Seurat |
Scanpy |
| Language |
R |
Python |
| Speed |
Fast |
Faster for large data |
| Memory |
Moderate |
Lower |
| Ecosystem |
Bioconductor |
Python ML stack |
| Best for |
General analysis |
Large datasets, integration |
Tips
- Cell numbers: Expect 1,000-20,000 cells from typical 10X run
- Genes per cell: 200-5,000 is typical; very high may be doublets
- Mitochondrial: >20% suggests dying cells
- Resolution: Start at 0.5, adjust based on cluster quality
- Annotation: Check canonical markers for your tissue type
- Stage order: QC and doublet removal run per sample BEFORE integration; integrate, then cluster, then annotate, never reorder
- Multi-sample designs: Batch-correct on a shared embedding (Harmony/scVI/RPCA) and watch for over-correction; batch-mixing metrics alone reward flattening real biology, so pair them with a bio-conservation metric
- Condition DE: Aggregate raw counts to pseudobulk per sample and cell type, then use DESeq2/edgeR; cluster-marker p-values are descriptive labels, not condition inference
- Composition vs expression: A "DE" signal between conditions can be a proportion shift, so pair condition DE with a differential-abundance test (Milo or scCODA/sccomp/propeller)
- single-cell/preprocessing - QC thresholds, ambient-RNA removal, normalization choice
- single-cell/doublet-detection - Per-sample doublet calling before integration
- single-cell/hashing-demultiplexing - Demultiplex hashed/multiplexed pools to samples before QC
- single-cell/batch-integration - Multi-sample integration and over-correction diagnosis
- single-cell/clustering - Resolution sweep and cluster validation
- single-cell/markers-annotation - Marker discovery, manual labeling, and pseudobulk condition DE
- single-cell/cell-annotation - Automated reference-based label transfer
- single-cell/differential-abundance - Test whether cell-type proportions shifted between conditions
- single-cell/trajectory-inference - Pseudotime and lineage reconstruction for continuous processes
- differential-expression/deseq2-basics - Pseudobulk condition DE engine for aggregated counts
- pathway-analysis/go-enrichment - Functional interpretation of marker and DE gene lists