rna-seq-analysis
Automate RNA-seq alignment, quantification, and differential expression analysis pipelines.
Install
mkdir -p .claude/skills/rna-seq-analysis && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11808" && unzip -o skill.zip -d .claude/skills/rna-seq-analysis && rm skill.zipInstalls to .claude/skills/rna-seq-analysis
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Bulk RNA-seq analysis pipeline covering alignment (STAR), quantification (Salmon, featureCounts), and differential expression (DESeq2). Triggers on RNA-seq, STAR, Salmon, DESeq2, differential expression, gene expression, tximport, featureCounts, transcriptomics, "bulk RNA-seq", "STAR alignment", "Salmon quantification", "gene counts", "DESeq2 results", "shrinkage estimator", "volcano plot RNA-seq".Key capabilities
- →Choose between alignment-based and alignment-free quantification
- →Determine strandedness for RNA-seq data
- →Set up DESeq2 from count sources
- →Debug low counts or weak differential expression signal
- →Apply DESeq2 shrinkage estimators
- →Filter low-count genes before analysis
How it works
The skill provides decision logic for RNA-seq quantification and DESeq2 modeling, guiding users to avoid common pitfalls in differential expression analysis.
Inputs & outputs
When to use rna-seq-analysis
- →Align RNA-seq data
- →Perform gene expression quantification
- →Analyze differential expression
About this skill
RNA-seq Analysis — Pipeline Skill (Thin Scaffold)
Overview
Adds decision logic for choosing quantification paths (STAR vs Salmon), strandedness determination, and DESeq2 modeling pitfalls that LLMs routinely get wrong.
Usage
- Activate when choosing between alignment-based (STAR+featureCounts) vs alignment-free (Salmon) quantification
- Activate when setting up DESeq2 from either count source
- Activate when debugging unexpected low counts or weak DE signal
Core Concepts
Decision Logic
Need BAMs? (variant calling, fusions, novel transcripts)
├── YES → STAR two-pass + featureCounts
└── NO → Salmon (faster, lower RAM, bias-corrected)
Salmon output → DESeq2:
└── Use DESeqDataSetFromTximport (preserves length offset)
└── NEVER round txi$counts and pass to DESeqDataSetFromMatrix
Filtering strategy (VQSR equivalent):
├── ≥30 samples → VQSR-like (default DESeq2 shrinkage works well)
└── <30 samples → still works, but pre-filter aggressively
Strandedness determination (MUST verify before counting):
| Kit | featureCounts -s | Salmon -l |
|---|---|---|
| TruSeq Stranded / dUTP | 2 | ISR (PE) / SR (SE) |
| Ligation / forward | 1 | ISF / SF |
| Unstranded | 0 | IU / U |
Verify with: infer_experiment.py (RSeQC) or Salmon's lib_format_counts.json.
Critical Parameters
| Parameter | Value | When to change |
|---|---|---|
--sjdbOverhang | readLength - 1 (default 100) | Non-100bp reads |
--twopassMode Basic | Always for DE | Skip only for speed in QC runs |
Salmon --gcBias --seqBias | Always on | Never skip for Illumina |
Salmon --validateMappings | Always on | Enables selective alignment |
featureCounts -s | Kit-dependent | ALWAYS verify empirically |
| DESeq2 pre-filter | rowSums(counts >= 10) >= smallest_group | Adjust 10 for shallow sequencing |
lfcShrink type | "apeglm" | Use "ashr" for arbitrary contrasts |
| Design formula | ~ batch + condition (interest LAST) | Always put interest term last |
Common Mistakes
-
Wrong: Guessing strandedness (
-s) instead of verifying empirically Right: Check withinfer_experiment.pyor Salmonlib_format_counts.jsonbefore running featureCounts Why: Wrong strandedness causes 2–10× lower counts and weak DE signal -
Wrong: Passing normalized counts (TPM, FPKM, CPM) to DESeq2 Right: Always start from raw integer counts Why: Normalized values break the negative-binomial model
-
Wrong: Rounding
txi$countsand passing toDESeqDataSetFromMatrixRight: UseDESeqDataSetFromTximport(txi, ...)which preserves the length offset Why: Rounding discards per-gene length correction for transcript-length bias -
Wrong: Placing variable of interest first in design (
~ condition + batch) Right: Put interest last:~ batch + conditionWhy: DESeq2 tests the last term by default -
Wrong: Assuming DESeq2 reorders samples to match Right: Assert
stopifnot(all(colnames(cts) == rownames(coldata)))before creating DESeq object Why: DESeq2 silently mislabels samples if order doesn't match -
Wrong: Skipping pre-filtering of low-count genes Right: Filter with
rowSums(counts(dds) >= 10) >= smallest_group_sizeWhy: Near-zero genes inflate runtime and dilute multiple-testing correction -
Wrong: Using STAR
ReadsPerGene.out.tabcolumn 2 for stranded libraries Right: Use column 3 (forward) or column 4 (reverse) matching your kit Why: Column 2 is unstranded; using it for stranded data halves effective counts -
Wrong: Including samples with <10M mapped reads or <70% mapping rate Right: Exclude or flag before fitting Why: Low-quality samples distort size factors and dispersion estimates
-
Wrong: Modeling when batch is perfectly confounded with condition Right: Check
table(coldata$batch, coldata$condition)first Why: No statistical model can separate perfectly correlated effects
Response Format
- Lead with the command or code the user needs — explain after
- Structure as: confirm inputs → working code → key parameters explained → gotchas
- One complete working example per task; do not show every alternative
- Keep code comments minimal and functional (what, not why-it-exists)
- Target: 50-100 lines of code with brief surrounding explanation
When not to use it
- →Passing normalized counts to DESeq2
- →Guessing strandedness instead of verifying empirically
- →Rounding txi$counts for DESeqDataSetFromMatrix
Limitations
- →Does not support normalized counts for DESeq2 input
- →Requires empirical verification of strandedness
- →Does not reorder samples to match DESeq2
How it compares
This skill explicitly addresses common mistakes like incorrect strandedness or passing normalized counts to DESeq2, which are often overlooked in generic workflows.
Compared to similar skills
rna-seq-analysis side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| rna-seq-analysis (this skill) | 0 | 2mo | Review | Advanced |
| quant-analyst | 103 | 2mo | No flags | Advanced |
| umap-learn | 6 | 2mo | Review | Intermediate |
| embedding-strategies | 8 | 2mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by awslabs
View all by awslabs →You might also like
quant-analyst
zenobi-us
Expert quantitative analyst specializing in financial modeling, algorithmic trading, and risk analytics. Masters statistical methods, derivatives pricing, and high-frequency trading with focus on mathematical rigor, performance optimization, and profitable strategy development.
umap-learn
K-Dense-AI
UMAP dimensionality reduction. Fast nonlinear manifold learning for 2D/3D visualization, clustering preprocessing (HDBSCAN), supervised/parametric UMAP, for high-dimensional data.
embedding-strategies
wshobson
Select and optimize embedding models for semantic search and RAG applications. Use when choosing embedding models, implementing chunking strategies, or optimizing embedding quality for specific domains.
building-automl-pipelines
jeremylongshore
Build automated machine learning pipelines, including feature engineering, model selection, and performance evaluation.
model-compare
rawwerks
Compare 3D CAD models using boolean operations (IoU, Dice, precision/recall). Use when evaluating generated models against gold references, diffing CAD revisions, or computing similarity metrics for ML training. Triggers on: model diff, compare models, IoU, intersection over union, model similarity, CAD comparison, STEP diff, 3D evaluation, gold reference, generated model, precision recall 3D.
matchms
davila7
Mass spectrometry analysis. Process mzML/MGF/MSP, spectral similarity (cosine, modified cosine), metadata harmonization, compound ID, for metabolomics and MS data processing.