Agent Skill: PyDESeq2 Bulk RNA-Seq Differential Expression Skill
📌 Description
Automated negative binomial differential gene expression analysis, log2 fold-change calculation, p-value adjustment (FDR), and Volcano plot generation.
🤖 Agent Execution Protocol
When an AI Agent is tasked with pydeseq2-bulk-rna:
- Input Validation: Verify that the required input files or coordinates are supplied.
- Environment Check: Ensure dependencies (
PyDESeq2, DESeq2, Pandas, Plotly) are installed. - Execution: Run the protocol pipeline snippet below.
- Output Generation: Produce actionable Markdown/JSON summaries with publication figures.
💻 Protocol Code Snippet
import pandas as pd
from pydeseq2.dds import DeseqDataSet
from pydeseq2.ds import DeseqStats
def run_dge(counts_df, metadata_df, design_factors="condition"):
# Real PyDESeq2 Differential Expression Pipeline
dds = DeseqDataSet(
counts=counts_df,
metadata=metadata_df,
design_factors=design_factors
)
dds.deseq2()
stat_res = DeseqStats(dds, contrast=["condition", "treated", "control"])
stat_res.summary()
return stat_res.results_df
📥 Input & Output Specifications
Input Contract
- Target Files: Valid input data matching domain formats.
- Parameters: Quality thresholds and cutoffs.
Output Contract
- Results Table: Structured summary dataframe or matrix.
- Visualization: Rendered SVG/PNG figures.
📄 License
Distributed under the MIT License. See LICENSE for details.