Pydeseq2

From omar-A-hassan/medsci-agent · View interactive version

Pydeseq2 is an AI agent skill from the GitHub repository omar-A-hassan/medsci-agent. PyDESeq2 for differential gene expression analysis of RNA-seq count data

How to use this skill

Skill file

PyDESeq2

Overview

PyDESeq2 is a Python implementation of the DESeq2 method for differential expression analysis of RNA-seq count data. It uses negative binomial generalized linear models with shrinkage estimation.

Typical Workflow

import pandas as pd
from pydeseq2.dds import DeseqDataSet
from pydeseq2.ds import DeseqStats

# counts: genes x samples DataFrame of raw counts (integers, unnormalized)
# metadata: samples DataFrame with condition column
counts = pd.read_csv("counts.csv", index_col=0)
metadata = pd.read_csv("metadata.csv", index_col=0)

# Create dataset
dds = DeseqDataSet(counts=counts, metadata=metadata, design="~condition")

# Run DESeq2 pipeline (size factors, dispersion, GLM fitting)
dds.deseq2()

# Statistical testing
stat_res = DeseqStats(dds, contrast=["condition", "treated", "control"])
stat_res.summary()

# Results DataFrame
results_df = stat_res.results_df
sig = results_df[results_df["padj"] < 0.05].sort_values("log2FoldChange")

Key Columns in Results

Key Details

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.