Volcano Plot Script Generator#
A skill for generating publication-ready volcano plots from differential gene expression analysis results.
When to Use#
- Use this skill when the task is to Generate R/Python code for volcano plots from DEG (Differentially Expressed Genes) analysis results. Triggered when user needs visualization of gene expression data, p-value vs fold-change scatter plots, publication-ready figures for bioinformatics analysis.
- Use this skill for data analysis tasks that require explicit assumptions, bounded scope, and a reproducible output format.
- Use this skill when you need a documented fallback path for missing inputs, execution errors, or partial evidence.
Key Features#
- Scope-focused workflow aligned to: Generate R/Python code for volcano plots from DEG (Differentially Expressed Genes) analysis results. Triggered when user needs visualization of gene expression data, p-value vs fold-change scatter plots, publication-ready figures for bioinformatics analysis.
- Packaged executable path(s):
scripts/main.py.
- Reference material available in
references/ for task-specific guidance.
- Reusable packaged asset(s), including
assets/example_volcano.R.
- Structured execution path designed to keep outputs consistent and reviewable.
Dependencies#
Example Usage#
See ## Usage above for related details.
bash
cd "20260318/scientific-skills/Data Analytics/volcano-plot-script"
python -m py_compile scripts/main.py
python scripts/main.py --help
Example run plan:
- Confirm the user input, output path, and any required config values.
- Edit the in-file
CONFIG block or documented parameters if the script uses fixed settings.
- Run
python scripts/main.py with the validated inputs.
- Review the generated output and return the final artifact with any assumptions called out.
Implementation Details#
See ## Workflow above for related details.
- Execution model: validate the request, choose the packaged workflow, and produce a bounded deliverable.
- Input controls: confirm the source files, scope limits, output format, and acceptance criteria before running any script.
- Primary implementation surface:
scripts/main.py.
- Reference guidance:
references/ contains supporting rules, prompts, or checklists.
- Packaged assets: reusable files are available under
assets/.
- Parameters to clarify first: input path, output path, scope filters, thresholds, and any domain-specific constraints.
- Output discipline: keep results reproducible, identify assumptions explicitly, and avoid undocumented side effects.
Quick Check#
Use this command to verify that the packaged script entry point can be parsed before deeper execution.
bash
python -m py_compile scripts/main.py
Audit-Ready Commands#
Use these concrete commands for validation. They are intentionally self-contained and avoid placeholder paths.
bash
python -m py_compile scripts/main.py
python scripts/main.py --help
python scripts/main.py --input "Audit validation sample with explicit symptoms, history, assessment, and next-step plan."
Workflow#
- Confirm the user objective, required inputs, and non-negotiable constraints before doing detailed work.
- Validate that the request matches the documented scope and stop early if the task would require unsupported assumptions.
- Use the packaged script path or the documented reasoning path with only the inputs that are actually available.
- Return a structured result that separates assumptions, deliverables, risks, and unresolved items.
- If execution fails or inputs are incomplete, switch to the fallback path and state exactly what blocked full completion.
Overview#
Volcano plots visualize the relationship between statistical significance (p-values) and magnitude of change (fold changes) in gene expression data. This skill generates customizable R or Python scripts for creating high-quality figures suitable for publications.
Use Cases#
- Visualize RNA-seq DEG analysis results
- Identify significantly upregulated and downregulated genes
- Highlight genes of interest (markers, pathways)
- Generate publication-quality figures for manuscripts
- Compare multiple experimental conditions
Required input data format:
- Gene identifier (gene symbol or ENSEMBL ID)
- Log2 fold change values
- Adjusted or raw p-values
- Optional: gene annotations, pathways
Output#
- Publication-ready volcano plot (PNG/PDF/SVG)
- Customizable R or Python script
- Optional: labeled significant gene lists
Usage#
python
# Example: Run the volcano plot generator
python scripts/main.py --input deg_results.csv --output volcano_plot.png
Parameters#
ParameterDescriptionDefault--inputPath to DEG results CSV/TSVrequired--outputOutput plot file pathvolcano_plot.png--log2fc-colColumn name for log2 fold changelog2FoldChange--pvalue-colColumn name for p-valuepadj--gene-colColumn name for gene IDsgene--log2fc-threshLog2 FC threshold for significance1.0--pvalue-threshP-value threshold0.05--label-genesFile with genes to labelNone--top-nLabel top N significant genes10--color-upColor for upregulated genes#E74C3C--color-downColor for downregulated genes#3498DB--color-nsColor for non-significant genes#95A5A6
Technical Difficulty#
Medium - Requires understanding of:
- DEG analysis concepts (fold change, p-values, FDR)
- Data visualization principles
- Matplotlib/ggplot2 plotting libraries
Python#
- pandas
- matplotlib
- seaborn
- numpy
- ggplot2
- dplyr
- ggrepel (for label positioning)
References#
- Example datasets and templates
- Best practices for volcano plot visualization
- Color schemes for accessibility
Author#
Auto-generated skill for bioinformatics visualization.
Risk Assessment#
Risk IndicatorAssessmentLevelCode ExecutionPython/R scripts executed locallyMediumNetwork AccessNo external API callsLowFile System AccessRead input files, write output plotsMediumInstruction TamperingStandard prompt guidelinesLowData ExposureOutput files saved to workspaceLow
Security Checklist#
- No hardcoded credentials or API keys
- Input file paths validated (no ../ traversal)
- Output directory restricted to workspace
- Script execution in sandboxed environment
- Error messages sanitized (no stack traces exposed)
- Dependencies audited (pandas, matplotlib, seaborn, numpy)
Prerequisites#
text
# Python dependencies
pip install -r requirements.txt
# R dependencies (if using R)
install.packages(c("ggplot2", "dplyr", "ggrepel"))
Evaluation Criteria#
Success Metrics#
- Successfully generates executable Python/R script
- Output plot is publication-ready quality
- Correctly identifies significant genes based on thresholds
- Handles missing or malformed data gracefully
- Color scheme is accessible (colorblind-friendly)
Test Cases#
- Basic DEG Visualization: Input standard DESeq2 results → Valid volcano plot
- Custom Thresholds: Adjust log2FC and p-value thresholds → Correct gene classification
- Gene Labeling: Specify genes to label → Labels appear correctly
- Large Dataset: Input 20,000+ genes → Performance remains acceptable
- Malformed Data: Input with missing values → Graceful error handling
Lifecycle Status#
-
Current Stage: Draft
-
Next Review Date: 2026-03-06
-
Known Issues: None
-
Planned Improvements:
- Add interactive plot option (Plotly)
- Support for multiple comparison groups
- Integration with pathway enrichment tools
Output Requirements#
Every final response should make these items explicit when they are relevant:
- Objective or requested deliverable
- Inputs used and assumptions introduced
- 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 the documented scope, stop instead of guessing or silently widening the assignment.
- If
scripts/main.py fails, report the failure point, summarize what still can be completed safely, and provide a manual fallback.
- Do not fabricate files, citations, data, search results, or execution outcomes.
This skill accepts requests that match the documented purpose of volcano-plot-script and include enough context to complete the workflow safely.
Do not continue the workflow when the request is out of scope, missing a critical input, or would require unsupported assumptions. Instead respond:
volcano-plot-script only handles its documented workflow. Please provide the missing required inputs or switch to a more suitable skill.
Response Template#
Use the following fixed structure for non-trivial requests:
- Objective
- Inputs Received
- Assumptions
- Workflow
- Deliverable
- Risks and Limits
- Next Checks
If the request is simple, you may compress the structure, but still keep assumptions and limits explicit when they affect correctness.