Agent skill
volcano-plot-script
Generate publication-ready R or Python volcano plot scripts from DEG analysis results with customizable thresholds, gene labeling, and color schemes.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/volcano-plot-script
SKILL.md
Volcano Plot Script Generator
Generate publication-ready volcano plots from differential gene expression (DEG) analysis results. Produces customizable R or Python scripts for high-quality figures.
Quick Check
python -m py_compile scripts/main.py
python scripts/main.py --help
When to Use
- Visualizing RNA-seq DEG results (DESeq2, edgeR, limma output)
- Identifying significantly up/downregulated genes by threshold
- Highlighting specific genes of interest with labels
- Generating publication-quality figures for manuscripts
Usage
python scripts/main.py \
--input deg_results.csv \
--output volcano_plot.png \
--log2fc-thresh 1.0 \
--pvalue-thresh 0.05 \
--top-n 10
Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
--input |
Yes | — | DEG results CSV/TSV file path |
--output |
No | volcano_plot.png | Output plot file path |
--log2fc-col |
No | log2FoldChange | Column name for log2 fold change |
--pvalue-col |
No | padj | Column name for p-value |
--gene-col |
No | gene | Column name for gene IDs |
--log2fc-thresh |
No | 1.0 | Log2 FC threshold for significance |
--pvalue-thresh |
No | 0.05 | P-value threshold |
--label-genes |
No | None | File with specific genes to label |
--top-n |
No | 10 | Label top N significant genes |
--color-up |
No | #E74C3C | Color for upregulated genes |
--color-down |
No | #3498DB | Color for downregulated genes |
--color-ns |
No | #95A5A6 | Color for non-significant genes |
Input Format
Required CSV/TSV columns:
- Gene identifier (gene symbol or ENSEMBL ID)
- Log2 fold change values
- Adjusted or raw p-values
Workflow
- Confirm objective, required inputs, and constraints before proceeding.
- Validate request matches documented scope; stop early if unsupported assumptions are needed.
- Run
scripts/main.pywith available inputs, or use the documented reasoning path. - Return structured result separating assumptions, deliverables, risks, and unresolved items.
- On execution failure or incomplete inputs, switch to fallback path and state exactly what blocked completion.
Fallback Template
If scripts/main.py cannot run (missing --input, malformed file), respond with:
FALLBACK REPORT
───────────────────────────────────────
Objective : <stated goal>
Blocked by : <exact missing input or error>
Partial result : <what can still be assessed manually>
Next step : Ensure --input points to a valid CSV with log2FC and p-value columns
───────────────────────────────────────
Note:
--inputis required. Passing a non-CSV string will cause exit code 1. Always validate the input file path before running.
Output
- Publication-ready volcano plot (PNG/PDF/SVG)
- Customizable Python script
- Optional: labeled significant gene list
- R Script Generation: Use
--language rto generate a ggplot2/ggrepel R script instead of Python. The R output usesgeom_point()for the scatter plot andggrepel::geom_text_repel()for gene labels.
Output Requirements
Every response must make these explicit when relevant:
- Objective or requested deliverable
- Inputs used and assumptions introduced (including all non-default column names and any gene list file used)
- Workflow or decision path
- Core result, recommendation, or artifact
- Constraints, risks, caveats, or validation needs
- Unresolved items and next-step checks
Error Handling
- If required inputs are missing, state exactly which fields are missing and request only the minimum additional information.
- If the task goes outside documented scope, stop instead of guessing or silently widening the assignment.
- If
scripts/main.pyfails, report the failure point, summarize what can still be completed safely, and provide the manual fallback above. - NaN p-values: If NaN values are detected in the p-value column, emit a warning: "Warning: [N] genes have NaN p-values and will be plotted as non-significant."
- Do not fabricate files, citations, data, search results, or execution outcomes.
Input Validation
This skill accepts: DEG results tables (CSV/TSV) with log2 fold change and p-value columns for generating volcano plot scripts and figures.
If the request does not involve volcano plot generation — for example, asking to perform DEG analysis, run pathway enrichment, or generate heatmaps — do not proceed. Instead respond:
"volcano-plot-script is designed to generate volcano plot scripts from DEG results. Your request appears to be outside this scope. Please provide a DEG results CSV with log2FC and p-value columns, or use a more appropriate tool for your task."
Response Template
Use this fixed structure for non-trivial requests:
- Objective
- Inputs Received
- Assumptions
- Workflow
- Deliverable
- Risks and Limits
- Next Checks
For simple requests, compress the structure but keep assumptions and limits explicit when they affect correctness.
References
- Example datasets and templates
Prerequisites
pip install -r requirements.txt
# Python: pandas, matplotlib, seaborn, numpy
# R (optional): ggplot2, dplyr, ggrepel
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?