Skip to content
Skills Library
Science & research · Analysis

rna-seq-analysis

/rna-seq-analysis

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".

Licence
MIT
Last repository change
02.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
1
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 02.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/deseq2_contrast.py

What it does and when to use it

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".

Triggers from the description

bulk RNA-seqSTAR alignmentSalmon quantificationgene countsDESeq2 resultsshrinkage estimatorvolcano plot RNA-seq
Original author description

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".

How it works

  1. Overview
  2. Usage
  3. Core Concepts
  4. Decision Logic
  5. Critical Parameters
  6. Common Mistakes
  7. Response Format
Original SKILL.md headings · 100 lines, 623 words
SKILL.md preview
---
name: rna-seq-analysis
description: 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".
usage: Invoke when running bulk RNA-seq alignment, quantification, or differential expression analysis with STAR, Salmon, or DESeq2.
version: 1.0.0
validated_against:
  date: 2025-01-15
  packages: {star: "2.7.11", salmon: "1.10", deseq2: "1.42"}
tags: [skill, category:pipeline, genomics, rna-seq, star, deseq2, differential-expression, hcls]
---

# 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 with `infer_experiment.py` or Salmon `lib_format_counts.json` before 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$counts` and passing to `DESeqDataSetFromMatrix`
  **Right:** Use `DESeqDataSetFromTximport(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 + condition`
  **Why:** 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_size`
  **Why:** Near-zero genes inflate runtime and dilute multiple-testing correction

- **Wrong:** Using STAR `ReadsPerGene.out.tab` column 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
Files in this package (2)
  • SKILL.md 5 KB
  • scripts/deseq2_contrast.py 10 KB

Versions

The database has no other skills named rna-seq-analysis.

Database snapshot: 13.11.2026 · package version 405ece68e2b2 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100bulk-rnaseq
    End-to-end bulk RNA-seq orchestrator — takes raw FASTQ reads through QC and trimming (FastQC, fastp/Trim Galore), alignment and quantification (STAR, Salmon, featureCounts), assembles a gene-level counts matrix, then hands off to differential expression (pydeseq2), pathway/GSEA…
  • 100bulk-rnaseq
    End-to-end bulk RNA-seq orchestrator — takes raw FASTQ reads through QC and trimming (FastQC, fastp/Trim Galore), alignment and quantification (STAR, Salmon, featureCounts), assembles a gene-level counts matrix, then hands off to differential expression (pydeseq2), pathway/GSEA…
  • 100bulk-rnaseq
    Prepares bulk RNA-seq FASTQ, Salmon, STAR or featureCounts output for gene-level differential expression. Covers nf-core/rnaseq and standalone quantification, biological replication, strandedness, reference provenance, validated count assembly and a PyDESeq2 handoff. Use for…
  • 95bio-workflows-rnaseq-to-de
    Orchestrates the end-to-end bulk RNA-seq differential-expression pipeline from FASTQ to an annotated DE gene table, chaining fastp QC/trim, Salmon (decoy-aware) or STAR+featureCounts quantification, tximport gene-level collapse, DESeq2/edgeR/limma-voom testing, apeglm shrinkage,…
  • 100differential-expression-analysis
    Use when analyzing bulk RNA-seq or microarray expression data to identify differentially expressed genes between two biological groups (case vs control), with volcano plots and heatmap visualization. NOT for:single-cell RNA-seq, methylation analysis, non-expression data.
  • 95pipeline-rnaseq
    Execute ENCODE RNA-seq pipeline from FASTQ to gene quantification and signal tracks. Child of pipeline-guide. Provides Nextflow execution with Docker and cloud deployment. Use when processing RNA-seq data with STAR alignment, RSEM/Kallisto quantification, or generating…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.