albert-ying/autonomous-lab/differential-expression

Claude Code and agent skill by albert-ying/autonomous-lab

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Differential gene expression analysis with PyDESeq2. Design matrices, contrasts, multiple testing correction, volcano plots.

Install

npx vskill@latest install albert-ying/autonomous-lab/differential-expression

SKILL.md

Differential expression

When to use

  • Bulk RNA-seq differential expression
  • Multi-factor experimental designs
  • Batch effect correction in DE analysis
  • Generating volcano and MA plots

Standard PyDESeq2 workflow

python
from pydeseq2.dds import DeseqDataSet
from pydeseq2.ds import DeseqStats
import pandas as pd
# counts: genes x samples DataFrame; metadata: samples DataFrame
dds = DeseqDataSet(
counts=counts_df,
metadata=metadata_df,
design="~batch + condition", # batch correction built into design
)
dds.deseq2()
# Extract results for a contrast
stat_res = DeseqStats(dds, contrast=["condition", "treated", "control"])
stat_res.summary()
results_df = stat_res.results_df
# Filter significant genes
sig = results_df[
(results_df["padj"] < 0.05) & (results_df["log2FoldChange"].abs() > 1)
]

Volcano plot

python
import matplotlib.pyplot as plt
import numpy as np
df = results_df.copy()
df["-log10p"] = -np.log10(df["padj"].clip(lower=1e-300))
fig, ax = plt.subplots(figsize=(8, 6))
colors = np.where(
(df["padj"] < 0.05) & (df["log2FoldChange"] > 1), "red",
np.where((df["padj"] < 0.05) & (df["log2FoldChange"] < -1), "blue", "gray")
)
ax.scatter(df["log2FoldChange"], df["-log10p"], c=colors, s=8, alpha=0.5)
ax.axhline(-np.log10(0.05), ls="--", color="gray", lw=0.8)
ax.axvline(-1, ls="--", color="gray", lw=0.8)
ax.axvline(1, ls="--", color="gray", lw=0.8)
ax.set_xlabel("log2 Fold Change")
ax.set_ylabel("-log10 adjusted p-value")

Design matrix tips

  • Always include batch as a covariate if samples were processed in batches.
  • Put the variable of interest last in the formula.
  • For paired designs: ~patient + treatment.
  • For interaction: ~genotype + treatment + genotype:treatment.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/albert-ying/autonomous-lab/differential-expression/badge)](https://verified-skill.com/skills/albert-ying/autonomous-lab/differential-expression)

Something wrong with this skill or its page? Tell us.