RNA-seq Count Matrix QC
Checks your RNA-seq counts for outliers, batch effects and sample swaps in DESeq2 before testing.
Claude's review
7/10 Solid DESeq2 count QC covering VST, Cook distances, batch in the design, sample swaps and halt criteria.
We asked Claude the question you would ask: would I be glad I installed this? Two separate reviews, the second blind to the first, must both rate a skill 7 or higher before we sell it.
In detail
Quality control and exploration of RNA-seq count matrices before differential expression. Use when checking library sizes and composition, choosing VST vs rlog for visualization, running PCA and sample correlation, detecting outliers with Cook's distance, deciding how to handle known vs unknown batch effects, screening for sample swaps, or judging whether a sample or design is too compromised to test.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: bio-rna-quantification-count-matrix-qc
description: Quality control and exploration of RNA-seq count matrices before differential expression. Use when checking library sizes and composition, choosing VST vs rlog for visualization, running PCA and sample correlation, detecting outliers with Cook's distance, deciding how to handle known vs unknown batch effects, screening for sample swaps, or judging whether a sample or design is too compromised to test.
tool_type: mixed
primary_tool: DESeq2
---
## Version Compatibility
Reference examples tested with: DESeq2 1.42+, edgeR 4.0+, ggplot2 3.5+, pheatmap 1.0+, matplotlib 3.8+, numpy 1.26+, pandas 2.2+, scikit-learn 1.4+, scipy 1.12+, seaborn 0.13+
Before using code patterns, verify installed versions match. If versions differ:
- R: `packageVersion('<pkg>')` then `?function_name` to verify parameters
- Python: `pip show <package>` then `help(module.function)` to check signatures
If code throws ImportError, AttributeError, or TypeError, introspect the installed
package and adapt the example to match the actual API rather than retrying.
# Count Matrix QC
**"Check my count matrix for outliers and batch effects"** -> Assess depth, composition, sample relationships, and outliers on appropriately transformed data, then decide what (if anything) to remove or model before differential expression.
- R: `DESeq2::vst()` -> `plotPCA()`, sample-distance heatmap, Cook's distance
- Python: `sklearn.decomposition.PCA`, `seaborn.clustermap` (with the low-count caveat below)
Two principles govern this whole skill. First, DE testing runs on raw counts with a size-factor offset; the transformed matrices here are for QC and visualization only, never fed back into the count model. Second, raw counts confound depth, composition, and biology, so QC must look at the right scale: a variance-stabilized matrix for clustering/PCA, and the size factors and Cook's distances from the count model for normalization and outliers.
## Load and Inspect
**Goal:** Get counts into a model object and read off depth and detection per sample.
**Approach:** Build a DESeqDataSet (from tximport or a matrix), then summarize library size and genes detected.
```r
library(DESeq2)
counts <- read.csv('count_matrix.csv', row.names = 1)
coldata <- data.frame(condition = factor(c('ctrl', 'ctrl', 'treat', 'treat')),
row.names = colnames(counts))
dds <- DESeqDataSetFromMatrix(countData = counts, colData = coldata, design = ~ condition)
colSums(counts(dds)) # library size per sample
...From GPTomics's repository, MIT licence.
Related skills
-
Checked
Citation claim checker
Checks each claim in a manuscript against its cited source and flags unsupported ones before submission.
8/101 credit -
Checked
Paper figure planning
Plans manuscript figures around one main claim each, with panel roles and legends that match your text.
7/101 credit -
Checked
Citation Checker
Checks every reference in your paper is real and accurately described, then fixes the bibliography errors.
8/101 credit -
Checked
Research paper critique
Critiques research papers on method, evidence and contribution, so you know how far to trust a study's claims.
7/101 credit -
Checked
Genes Behind A GWAS Hit
Finds genes behind your GWAS signal from predicted tissue expression, then narrows the real one.
8/101 credit -
Checked
Citation style formatting
Formats citations in APA, Chicago, Vancouver or IEEE with CSL, so reference lists match the style guide.
7/101 credit