scrnaseq-quality-control
Skill4 starsChanged 12 days agoMITView on GitHub
Ambient RNA removal, doublet detection, and cell filtering for single-cell RNA-seq count matrices.
In this repository56 other files it gives its agents.
- bioinformatics-env-setupSkill
- design-thermostable-mutationsSkill
- download-gdcSkill
- download-geoSkill
- download-sraSkill
- source-summarizerSkill
- genome-alignment-qcSkill
- genome-read-alignmentSkill
- genome-variant-annotationSkill
- genome-variant-callingSkill
- genome-variant-filteringSkill
- metagenome-assemblySkill
- metagenome-binningSkill
- metagenome-functional-profilingSkill
- metagenome-host-removalSkill
- metagenome-taxonomic-profilingSkill
- ncbi-eutilities-assistantSkill
- ngs-quality-controlSkill
- ngs-read-preprocessingSkill
- paper-to-briefSkill
- predict-protein-heat-stabilitySkill
- researchSkill
- rnaseq-alignment-qcSkill
- rnaseq-differential-expressionSkill
- rnaseq-functional-enrichmentSkill
- rnaseq-read-alignmentSkill
- rnaseq-read-countingSkill
- rnaseq-transcript-quantificationSkill
- rpsblast-assistantSkill
- scrnaseq-cellranger-countSkill
- scrnaseq-cell-type-annotationSkill
- scrnaseq-clusteringSkill
- scrnaseq-differential-expressionSkill
- scrnaseq-integrationSkill
- scrnaseq-trajectory-analysisSkill
- search-enaSkill
- search-geoSkill
- search-gsaSkill
- search-ncbi-datasetsSkill
- search-sraSkill
- stat-analyze-distributionSkill
- stat-assess-data-qualitySkill
- stat-bayesian-estimationSkill
- stat-cluster-samplesSkill
- stat-compare-multiple-groupsSkill
- stat-compare-two-groupsSkill
- stat-fit-glmSkill
- stat-fit-linear-modelSkill
- stat-learn-bayesian-networkSkill
- stat-logistic-regressionSkill
- stat-nonlinear-embeddingSkill
- stat-pairwise-correlationSkill
- stat-pcaSkill
- stat-survival-analysisSkill
- structured-intelligence-skill-creatorSkill
- <skill-id>Skill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Remove ambient RNA contamination:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: scRNA-seq Quality Control
Use When
- User has a feature-barcode count matrix (from Cell Ranger, STARsolo, or alevin-fry) and needs to remove low-quality cells and technical artifacts.
- User wants to detect and filter doublets (two or more cells captured in one droplet).
- User wants to remove ambient RNA contamination from the count matrix.
- User needs to determine appropriate filtering thresholds before clustering.
Inputs
- Required:
- Feature-barcode matrix directory or AnnData (.h5ad) or Seurat object (.rds)
- Raw (unfiltered) matrix directory (required for SoupX/CellBender ambient RNA removal)
- Optional:
- Framework:
scanpyorseurat(default:scanpy) - Ambient RNA removal tool:
soupx,cellbender, ornone(default:soupx) - Doublet detection tool:
scrublet,scdblfinder, ordoubletfinder(default:scrubletfor Scanpy,scdblfinderfor Seurat) - Mitochondrial gene prefix (default:
MT-for human,mt-for mouse) - Filtering thresholds: min/max nFeature_RNA, min/max nCount_RNA, max percent.mt (defaults: 200–6000 genes, 500–50000 UMIs, <20% MT)
- Expected doublet rate (default: 0.008 per 1000 cells loaded)
- Framework:
Workflow
- Load the filtered feature-barcode matrix into Scanpy (AnnData) or Seurat.
- Calculate per-cell QC metrics: number of genes detected (
nFeature_RNA), total UMI count (nCount_RNA), fraction of mitochondrial reads (percent.mt), and fraction of ribosomal reads (percent.ribo). - Visualize QC metric distributions as violin plots and scatter plots (
nCount_RNAvsnFeature_RNA,nCount_RNAvspercent.mt). - Remove ambient RNA contamination:
- SoupX (R): estimate the soup fraction using the raw + filtered matrices, correct counts, output a corrected count matrix.
- CellBender (Python): run
cellbender remove-backgroundon the raw matrix; use GPU if available for speed.
- Detect doublets:
- Scrublet (Python/Scanpy): simulate doublets by combining random cell pairs; assign doublet scores per cell; threshold at bimodal score distribution.
- scDblFinder (R/Bioconductor): simulate doublets and classify with a random forest classifier; recommended for Seurat workflows.
- DoubletFinder (Seurat, R): requires a pre-clustered object; insert after a first round of clustering.
- Apply filtering thresholds to remove low-quality cells. Adjust thresholds based on tissue type and expected cell size (e.g., neurons have high UMI counts; platelets have very low gene counts). Use MAD-based adaptive thresholds if cell populations are heterogeneous.
- Report a cell retention summary: input cells, cells after ambient correction, cells after doublet removal, cells after threshold filtering.
- Save filtered AnnData (.h5ad) or Seurat object (.rds).
Output Contract
- Filtered count matrix as AnnData (.h5ad) or Seurat object (.rds)
- QC metric violin plots and scatter plots (PDF)
- Doublet score distribution and UMAP plot (PDF)
- Cell retention summary table (TSV): filter stage, cells retained, cells removed
Limits
- SoupX requires both raw and filtered matrices; CellBender corrects empty droplets more aggressively but requires GPU for practical runtime.
- Mitochondrial thresholds vary by tissue: brain neurons tolerate higher MT% (up to 30%), while immune cells are typically <10%.
- Doublet rates depend on loading density: ~0.8% per 1000 cells for 10x Chromium v3.
- Aggressive filtering on gene count can eliminate genuine rare cell types with low transcriptional activity (e.g., platelets, quiescent stem cells); inspect boundary cells carefully.
- CellBender is slow on CPU (several hours per sample); plan accordingly if no GPU is available.
- Common failure cases:
- SoupX fails if the raw matrix directory is missing or misnamed.
- Scrublet thresholding fails on unimodal score distributions (all scores similar); inspect the histogram and set threshold manually.
- Seurat object version mismatch when loading
.rdsfiles between Seurat v4 and v5.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

