Runs differential gene expression analysis on bulk RNA-seq count matrices using PyDESeq2. Supports size-factor normalization, dispersion estimation, Wald tests, FDR correction, and volcano/MA plots.
Ships in alterlab-bioinformatics. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
PyDESeq2 is a Python implementation of DESeq2 for differential expression analysis with bulk RNA-seq data. It supports complete workflows from data loading through result interpretation, including single-factor and multi-factor designs, Wald tests with multiple-testing correction, optional apeGLM shrinkage, and integration with pandas and AnnData.
Use this skill when:
| Scenario | Use Instead |
|---|---|
| Single-cell differential expression or cluster marker genes | alterlab-scanpy (markers) or alterlab-scvi-tools (model-based DE) |
| Turning FASTQ into the count matrix (salmon/kallisto/STAR quantification, tximport) | alterlab-rnaseq-quant |
| Generic regression / GLM / mixed models on non-count data | alterlab-statsmodels |
| Gene regulatory network inference (which TFs drive which target genes) from expression | alterlab-arboreto |
| Somatic or germline variant calling from sequencing reads | alterlab-nf-core-sarek |
| Microbiome feature-table differential abundance | alterlab-qiime2-amplicon |
Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-scanpy) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.
uv pip install "pydeseq2>=0.5,<0.6"
System requirements (pydeseq2 0.5.x, current 0.5.4): Python ≥3.11; numpy ≥2.0, pandas ≥2.2,
scipy ≥1.12, scikit-learn ≥1.4, anndata ≥0.11, formulaic ≥1.0.2 and formulaic-contrasts ≥0.2
(parse the ~ design formula and build contrast vectors), matplotlib ≥3.9. These are pulled in
automatically as dependencies.
API note (0.4+): parallelism is configured through an inference object, not a bare n_cpus= kwarg:
from pydeseq2.default_inference import DefaultInference
inference = DefaultInference(n_cpus=8)
dds = DeseqDataSet(counts=counts_df, metadata=metadata, design="~condition", inference=inference)
ds = DeseqStats(dds, contrast=["condition", "treated", "control"], inference=inference)
.T if loaded genes × samples); filter low-count genes (e.g., total reads < 10); drop samples with missing metadata."~condition", "~batch + condition"); put adjustment variables before the variable of interest.DeseqDataSet(...).deseq2() runs the full pipeline (size factors → dispersions → LFCs → Cook's outliers).DeseqStats(dds, contrast=[var, test, ref]).summary(); read results_df.ds.lfc_shrink() for visualization/ranking only; p-values stay unshrunken.padj < 0.05, plot volcano/MA, save CSV/pickle.Minimal skeleton:
from pydeseq2.dds import DeseqDataSet
from pydeseq2.ds import DeseqStats
dds = DeseqDataSet(counts=counts_df, metadata=metadata, design="~condition")
dds.deseq2()
ds = DeseqStats(dds, contrast=["condition", "treated", "control"])
ds.summary()
significant = ds.results_df[ds.results_df.padj < 0.05]
This skill includes a complete standalone script for standard analyses:
python scripts/run_deseq2_analysis.py \
--counts counts.csv \
--metadata metadata.csv \
--design "~batch + condition" \
--contrast condition treated control \
--output results/ \
--min-counts 10 --alpha 0.05 --n-cpus 4 --plots
It handles data loading/validation, gene+sample filtering, the full DESeq2 pipeline, statistical testing with customizable parameters, result export (CSV, pickle), and optional volcano/MA plots. Refer users to scripts/run_deseq2_analysis.py for batch-processing multiple datasets.
references/pipeline_steps.md.references/interpretation_and_plots.md.references/interpretation_and_plots.md.references/api_reference.md.references/workflow_guide.md..T if needed."~batch + condition").padj < 0.05 (Benjamini-Hochberg FDR), not raw p-values.[variable, test_level, reference_level]. contrast also accepts a raw
numpy contrast vector over the design matrix columns for comparisons a three-element list
cannot express (e.g. interaction terms, averaging several levels).DeseqStats(..., lfc_null=1.0, alt_hypothesis="greaterAbs") asks "is |LFC| > 1?" inside the model. That is the statistically
correct way to demand an effect size — filtering a lfc_null=0 result on `abs(log2FoldChange)
1` afterwards does not control the FDR for that claim.
DeseqDataSet(..., size_factors_fit_type="poscounts") uses
the positive-counts estimator instead of the median-of-ratios default, which fails when no gene
is detected in every sample. control_genes= restricts size-factor estimation to spike-ins or
housekeeping genes.references/pipeline_steps.md — Quick-start, the six pipeline steps with full code (data prep, design, fitting, testing, shrinkage, export), and four common experimental designs.references/interpretation_and_plots.md — Filtering/ranking significant genes, quality metrics, volcano and MA plots, and a troubleshooting guide.references/api_reference.md — Complete PyDESeq2 class/method/parameter and data-structure documentation.references/workflow_guide.md — In-depth complete workflows, data-loading patterns, multi-factor designs, and best practices.evals/evals.json (opens in a new tab)evals/fixtures/counts.csv (opens in a new tab)evals/fixtures/metadata.csv (opens in a new tab)references/api_reference.md (opens in a new tab)references/interpretation_and_plots.md (opens in a new tab)references/pipeline_steps.md (opens in a new tab)references/workflow_guide.md (opens in a new tab)scripts/run_deseq2_analysis.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
38 skills in this plugin
/alterlab-alphafoldPredict protein 3D structures with AlphaFold2 via ColabFold — MMseqs2-accelerated MSAs, monomer and AlphaFold2-Multimer complex folding, and confidence-based validation (pLDDT, pTM/ipTM, PAE). Use when folding a protein sequence or complex from FASTA, generating a predicted structure with confidence metrics, ranking models, or checking self-consistency of a design. For co-folding a protein WITH a small-molecule ligand or predicting binding affinity prefer alterlab-boltz; for antibody–antigen or one-FASTA multi-entity complexes prefer alterlab-chai; to LOOK UP an already-computed structure prefer alterlab-alphafold-db; for ESM embeddings or inverse folding prefer alterlab-esm. Part of the AlterLab Academic Skills suite./alterlab-anndataBuild, slice, concatenate, read, and write AnnData annotated data matrices (obs, var, X, layers, obsm, uns) — the scverse data STRUCTURE, not an analysis pipeline. Use when creating or wrangling .h5ad/zarr files, managing cell and gene annotations, concatenating batches, or handling layers/obsm/backed-mode; for the QC, normalization, clustering, UMAP, and differential-expression analysis pipeline prefer alterlab-scanpy instead, and for RNA velocity from spliced/unspliced layers prefer alterlab-scvelo instead. Part of the AlterLab Academic Skills suite./alterlab-arboretoInfer gene regulatory networks (GRNs) from expression matrices using arboreto's scalable GRNBoost2 and GENIE3 tree-ensemble algorithms with Dask-distributed computation. Use when analyzing bulk or single-cell RNA-seq transcriptomics to map transcription-factor-to-target-gene regulatory interactions, build adjacency networks, or run the GRN-inference step of a SCENIC pipeline on large datasets. Part of the AlterLab Academic Skills suite./alterlab-biopythonManipulate biological sequences, parse FASTA/GenBank/PDB files, run phylogenetics, and access NCBI/PubMed programmatically via Biopython (Bio.SeqIO, Bio.Entrez, Bio.PDB, Bio.Blast). Use when scripting custom bioinformatics pipelines, batch-processing sequence files, automating BLAST, or fetching records from Entrez — for quick one-off database lookups use gget, for unified multi-service integration use bioservices. Part of the AlterLab Academic Skills suite./alterlab-bioservicesQuery 40+ bioinformatics web services through one consistent Python API with bioservices (UniProt, KEGG, ChEMBL, Reactome, Ensembl, NCBI and more). Use when a workflow must hit multiple databases together, map identifiers across services, or run cross-database analyses — for quick single-database lookups use gget, for sequence and file manipulation use biopython. Part of the AlterLab Academic Skills suite./alterlab-blastRuns NCBI BLAST+ 2.17.0 sequence searches from the command line: makeblastdb (with -parse_seqids), blastn/blastp/blastx/tblastn with tabular -outfmt 6/7 for parsing, correct -task choice (megablast vs blastn vs blastn-short), -taxids/-negative_taxids taxonomic scoping, and -mt_mode multithreading; plus a DIAMOND blastp --ultra-sensitive path for large protein searches. Warns that -max_target_seqs is a heuristic keep-count, not a top-N best-hits filter. Use when the user wants command-line BLAST, makeblastdb, a local BLAST database, blastn/blastp/blastx/tblastn searches, or DIAMOND protein search. For the Bio.Blast web NCBIWWW API prefer alterlab-biopython; for quick one-liner database lookups prefer alterlab-gget. Part of the AlterLab Academic Skills suite./alterlab-bioinformatics:alterlab-pydeseq2from alterlab-bioinformatics
npx claudepluginhub alterlab-ieu/alterlab-academic-skills --plugin alterlab-bioinformatics2 plugins in one repository ship this exact skill · first indexed Nov 9, 2026
Other plugins' skills for the same job