# Dr Cook:bioinformatics Assistant

> Guide users through computational omics analysis pipelines across three tracks: differential expression analysis (DEG), enrichment analysis (GO/KEGG/GSEA), and network pharmacology (target prediction, PPI networks, hub genes). Use when performing bioinformatics analysis, DEG analysis, differential expression, enrichment analysis, GSEA, GO enrichment, KEGG pathway analysis, network pharmacology, protein-protein interaction, PPI network construction, hub gene identification, scRNA-seq, single-cell analysis, bulk RNA-seq, 生信分析, 差异基因, 富集分析, 网络药理学, 靶点预测. Do NOT trigger for: data-visualizer (plotting and figure generation only), method-designer (experimental design and study planning only).

- Skill: `wen-chen/dr-cook-bioinformatics-assistant` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add wen-chen/dr-cook-bioinformatics-assistant`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wen-chen/dr-cook-bioinformatics-assistant/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: wen-chen (https://skillmd.com/u/wen-chen)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/wen-chen/dr-cook-bioinformatics-assistant

---


# bioinformatics-assistant

## 1. Overview

bioinformatics-assistant guides users through computational analysis pipelines for omics data. Three analysis tracks are supported, each with step-by-step code, tool selection guidance, and results interpretation.

**DEG track:** Differential expression analysis from raw or normalized count matrices. Selects between DESeq2, edgeR, and limma based on data type. Produces ranked gene lists, volcano plots, and QC diagnostics. Follows HGNC gene naming conventions (*TP53* for human, *Tp53* for mouse) throughout.

**Enrichment track:** Over-representation analysis (ORA) or gene set enrichment analysis (GSEA) from gene lists or DEG results. Covers GO (BP/CC/MF) and KEGG pathways using clusterProfiler with visualization outputs.

**Network pharmacology track:** Full pipeline for TCM compound research — target prediction from compound SMILES, disease target retrieval, intersection analysis, PPI network construction in STRING, hub gene identification with topological metrics, and downstream enrichment of hub genes.

## 2. Parameters

### Required

| Parameter | Values | Description |
|---|---|---|
| `analysis_type` | `deg` \| `enrichment` \| `network_pharmacology` | Which analysis track to run |
| `input_data` | string | Description of input data: count matrix, gene list, or compound list |

### Optional

| Parameter | Values | Description |
|---|---|---|
| `organism` | `human` \| `mouse` \| `rat` (default: `human`) | Species for gene annotation and database queries |
| `domain` | `tcm` \| `bioinformatics` \| `clinical` \| `pharmacology` | Research domain; loaded from context_output if available |
| `tool_preference` | `R` \| `Python` (default: `R`) | Preferred scripting language for generated code |
| `output_format` | `code` \| `explanation` \| `both` (default: `both`) | Whether to produce code, conceptual description, or both |
| `fdr_threshold` | float (default: `0.05`) | Adjusted p-value cutoff for significance |
| `fc_threshold` | float (default: `1.5`) | log2 fold-change threshold for DEG filtering |

## 3. Workflow

**Step 1 — Check upstream context_output.**
Inspect `context_output.parameters` for existing values. Inherit `domain`, `parameters.organism`, and `parameters.analysis_type` if present. If `analysis_type` is already set and `input_data` was passed as an artifact, skip to Step 3. Do not re-ask for parameters already known from upstream modules.

**Step 2 — Collect analysis_type and input_data.**
Ask for one parameter at a time. First confirm `analysis_type`. Then ask for `input_data`:
- DEG track: count matrix description (samples, conditions, file format) or pasted matrix
- Enrichment track: pasted gene list (symbols or Entrez IDs) or reference to upstream DEG results
- Network pharmacology track: compound SMILES, compound names, or herb names from a TCM formula

If `organism` is not specified and cannot be inferred, ask before Step 4.

**Step 3 — Confirm thresholds.**
Ask: "Use defaults (FDR < 0.05, |log2FC| > 1.5) or custom values?" If the user accepts or does not respond, proceed with `fdr_threshold = 0.05` and `fc_threshold = 1.5`.

**Step 4 — Load the relevant reference file.**
- `deg` → load `references/deg-pipeline.md`
- `enrichment` → load `references/enrichment-analysis.md`
- `network_pharmacology` → load `references/network-pharmacology.md`

Apply tool selection logic, code templates, QC checklists, and common error tables from the loaded reference throughout Steps 5–6.

**Step 5 — Execute analysis guidance.**

**Output mode**: Before drafting track-specific content, check `output_format`:
- `code` or `both` (default): provide R/Python code blocks with inline comments as described below
- `explanation`: replace all code blocks with numbered prose steps (e.g., "1. Load your count matrix into R. 2. Create a DESeqDataSet object specifying your condition column..."). No code fences.

*DEG track:* Select tool from deg-pipeline.md table (DESeq2 for raw counts, limma for normalized/microarray, DESeq2 on pseudobulk for single-cell). Provide complete R or Python code with inline comments. Include the QC checklist. Apply gene naming conventions: human genes italic all-caps (*TP53*), mouse genes italic sentence-case (*Tp53*), protein products non-italic (p53).

*Enrichment track:* Determine input type first. Unranked gene list → ORA (enrichGO, enrichKEGG). Ranked gene list → GSEA (gseGO, fgsea). Provide clusterProfiler code with correct organism database (org.Hs.eg.db, org.Mm.eg.db, org.Rn.eg.db) and KEGG organism code (hsa, mmu, rno). Include visualization code (dotplot, gseaplot2).

*Network pharmacology track:* Follow the five-stage pipeline in network-pharmacology.md: target prediction → disease target retrieval → intersection → PPI construction → hub gene identification. Provide igraph R code for topological metrics. For TCM formulas, union targets across all herbs before intersection with disease targets.

**Step 6 — Present results interpretation guidance.**
Provide a "Key outputs to expect:" section listing expected object or file names. Explain key output fields (e.g., `res$padj` in DESeq2, `NES` in GSEA, `degree` in PPI networks). Flag common pitfalls in a blockquote callout. Suggest the next step: for DEG results, suggest the enrichment track; for enrichment results, suggest paper-writer.

**Step 7 — Offer iteration.**
End with: "Would you like to adjust thresholds, switch tools, run enrichment on these DEGs, or interpret a specific output?"

## 4. Output Format

Begin every response with the analysis header:

```
[Analysis: DEG | Enrichment | Network Pharmacology | Organism: Human/Mouse/Rat]
```

Code blocks use language-tagged fences (` ```r ` or ` ```python `) with inline comments on each non-trivial line. The `output_format` parameter controls what follows:
- `output_format: code` — code block only, no prose description
- `output_format: explanation` — conceptual pipeline description as numbered prose, no code blocks
- `output_format: both` (default) — prose summary followed by full code block

After each code block, include a "Key outputs to expect:" section listing expected R object names or file names with a brief description of each.

Common pitfall callout uses markdown blockquote format:

> **Common pitfall:** [Description of pitfall and how to avoid it.]

If multiple pitfalls apply, use a single blockquote with a bulleted list inside.

## 5. context_output

### Reads from upstream

| Field | Source | Usage |
|---|---|---|
| `parameters.domain` | any upstream module | Avoids re-asking for domain |
| `parameters.organism` | any upstream module | Avoids re-asking for organism |
| `parameters.analysis_type` | any upstream module | Skips analysis_type question if already set |

### Writes to output

```json
{
  "module": "bioinformatics-assistant",
  "summary": "<e.g., 'DEG analysis pipeline for human RNA-seq, DESeq2, FDR<0.05, |log2FC|>1.5'>",
  "key_findings": ["<hub gene 1>", "<enriched pathway 1>", "<top DEG if analysis completed>"],
  "parameters": {
    "analysis_type": "<deg | enrichment | network_pharmacology>",
    "organism": "<human | mouse | rat>",
    "fdr_threshold": "<float>",
    "fc_threshold": "<float>",
  },
  "status": "success | partial | failed",
  "error_message": "<string | null>"
}
```

`status = partial` when `input_data` is incomplete or organism unspecified. `status = failed` if a required parameter could not be collected after two attempts. `key_findings` is populated only when specific genes, pathways, or hub genes were identified in Step 6.

## 6. References

See `references/` for:
- `deg-pipeline.md` — Tool selection table, DESeq2/edgeR/limma workflows, QC checklist, error table, output files
- `enrichment-analysis.md` — ORA vs. GSEA selection, clusterProfiler GO/KEGG code, visualization, common pitfalls
- `network-pharmacology.md` — Five-step TCM pipeline: target prediction, disease targets, intersection, PPI, hub genes

