agentleFS
Scientific-ToolingScientific-Tooling/structured-intelligence/skills/rnaseq-differential-expression/SKILL.md

rnaseq-differential-expression

Skill4 starsChanged 12 days agoMITView on GitHub

Statistical differential expression analysis using DESeq2 or edgeR in R, with support for count matrix or tximport input.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read count matrix or import transcript-level estimates via tximport.

    line 29
  2. Distinctive:

    Read sample metadata and validate that sample IDs match between counts and metadata.

    line 30
  3. Very specific:

    If DESeq2: create DESeqDataSetFromMatrix (or DESeqDataSetFromTximport), run DESeq(), extract results().

    line 32
  4. Very specific:

    If edgeR: create DGEList, calcNormFactors, estimateDisp, glmQLFit, glmQLFTest.

    line 33
  5. Distinctive:

    Write results table sorted by adjusted p-value.

    line 36
  6. Distinctive:

    Not suitable for single-cell RNA-seq without modifications.

    line 53

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: RNA-seq Differential Expression

Use When

  • User has a count matrix or transcript quantification and wants to find differentially expressed genes
  • User wants to perform statistical DE testing with proper normalization
  • User needs volcano plots, MA plots, PCA, and heatmaps
  • User wants to compare DESeq2 vs edgeR results

Inputs

  • Required:
    • Count matrix (TSV with gene IDs as rows, samples as columns) OR Salmon/kallisto quantification directories plus a tx2gene mapping file
    • Sample metadata (TSV with columns: sample_id, condition, and optionally batch)
  • Optional:
    • Tool choice: deseq2 or edger (default: deseq2)
    • Contrast: condition levels to compare (e.g., treated,control)
    • FDR threshold (default: 0.05)
    • log2 fold-change threshold (default: 1)
    • Output directory (default: ./de_output)

Workflow

  1. Read count matrix or import transcript-level estimates via tximport.
  2. Read sample metadata and validate that sample IDs match between counts and metadata.
  3. Build design formula (~ condition, or ~ batch + condition if batch column is provided).
  4. If DESeq2: create DESeqDataSetFromMatrix (or DESeqDataSetFromTximport), run DESeq(), extract results().
  5. If edgeR: create DGEList, calcNormFactors, estimateDisp, glmQLFit, glmQLFTest.
  6. Extract results: gene ID, log2 fold-change, p-value, adjusted p-value, baseMean (DESeq2) or logCPM (edgeR).
  7. Generate plots: PCA of samples, volcano plot, MA plot, heatmap of top DE genes.
  8. Write results table sorted by adjusted p-value.
  9. Report: total genes tested, number significant (up-regulated and down-regulated), summary of top hits.

Output Contract

  • DE results table (TSV): gene_id, log2FoldChange, pvalue, padj, baseMean/logCPM
  • PCA plot (PDF)
  • Volcano plot (PDF)
  • MA plot (PDF)
  • Heatmap of top DE genes (PDF)
  • Normalized count matrix (TSV)
  • R session info (text file)

Limits

  • Requires R with DESeq2 or edgeR installed (Bioconductor packages).
  • Minimum 3 biological replicates per condition recommended for reliable statistics.
  • Not suitable for single-cell RNA-seq without modifications.
  • Python alternative: PyDESeq2 for DESeq2-equivalent analysis.
  • Common failure cases: sample ID mismatch between counts and metadata, too few replicates, incorrect contrast specification.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.