scientific-skills/Data Analysis/in-silico-perturbation-oracle/SKILL.md
Virtual gene knockout simulation using foundation models to predict transcriptional changes
npx skillsauth add aipoch/medical-research-skills in-silico-perturbation-oracleInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
ID: 207
Category: Bioinformatics / Genomics / AI-Driven Drug Discovery
Status: ✅ Production Ready
Version: 1.0.0
⚠️ Note: This tool provides a framework for in silico perturbation analysis. Actual predictions require integration with biological foundation models (Geneformer, scGPT, etc.) and wet lab validation data.
In Silico Perturbation Oracle is a computational biology tool based on biological foundation models (Geneformer, scGPT, etc.) for performing "virtual gene knockout (Virtual KO)" in silico to predict changes in cellular transcriptome states after specific gene deletions.
This tool provides AI-driven decision support for target screening before wet lab experiments, significantly reducing drug development time and costs.
| Function Module | Description | Status | |---------|------|------| | 🧬 Gene Knockout Simulation | In silico KO prediction based on pre-trained models | ✅ | | 📊 Differential Expression Analysis | Predict DEGs (Differentially Expressed Genes) after knockout | ✅ | | 🔄 Pathway Enrichment Analysis | GO/KEGG pathway change prediction | ✅ | | 🎯 Target Scoring | Multi-dimensional target scoring and ranking | ✅ | | 📈 Visualization Report | Generate interpretable charts and reports | ✅ | | 🔗 Wet Lab Interface | Export wet lab validation recommendations | ✅ |
| Model | Description | Applicable Scenarios | |-----|------|---------| | Geneformer | Transformer-based gene expression foundation model | General gene regulatory network inference | | scGPT | Single-cell multi-omics foundation model | Single-cell level perturbation prediction | | scFoundation | Large-scale single-cell foundation model | Cross-cell type generalization prediction | | Custom | User-defined models | Specific disease/tissue customization |
# Basic dependencies
pip install torch transformers scanpy scvi-tools
# Bioinformatics tools
pip install gseapy enrichrpy
# Model-specific dependencies
pip install geneformer scgpt
# Single gene knockout prediction
python scripts/main.py \
--model geneformer \
--genes TP53,BRCA1,EGFR \
--cell-type "lung_adenocarcinoma" \
--output ./results/
# Batch target screening
python scripts/main.py \
--model scgpt \
--genes-file ./target_genes.txt \
--cell-type "hepatocyte" \
--top-k 20 \
--pathways KEGG,GO_BP \
--output ./results/
from in_silico_perturbation_oracle import PerturbationOracle
# Initialize Oracle
oracle = PerturbationOracle(
model_name="geneformer",
cell_type="cardiomyocyte"
)
# Execute virtual knockout
results = oracle.predict_knockout(
genes=["MYC", "KRAS", "BCL2"],
perturbation_type="complete_ko", # Complete knockout
n_permutations=100
)
# Get differentially expressed genes
degs = results.get_differential_expression(
pval_threshold=0.05,
logfc_threshold=1.0
)
# Pathway enrichment analysis
pathways = results.enrich_pathways(
database=["KEGG", "GO_BP"],
top_n=10
)
# Target scoring
target_scores = results.score_targets()
print(target_scores.head(10))
| Parameter | Type | Description | Example |
|-----|------|------|------|
| genes | list/str | List of genes to knockout | ["TP53", "BRCA1"] |
| cell_type | str | Target cell type | "fibroblast" |
| model | str | Foundation model to use | "geneformer" |
| Parameter | Type | Default | Description |
|-----|------|--------|------|
| perturbation_type | str | "complete_ko" | Knockout type: complete_ko/kd/crispr |
| n_permutations | int | 100 | Number of permutation tests |
| pathways | list | ["KEGG"] | Enrichment analysis database |
| top_k | int | 50 | Output Top K targets |
| control_genes | list | [] | Control gene list |
| batch_size | int | 32 | Inference batch size |
# Recommended naming format
epithelial_cells:
- lung_epithelial
- intestinal_epithelial
- mammary_epithelial
immune_cells:
- t_cell_cd4
- t_cell_cd8
- b_cell
- macrophage
- dendritic_cell
specialized_cells:
- cardiomyocyte
- hepatocyte
- neuron_excitatory
- fibroblast
- endothelial_cell
deg_results.csv)| Column Name | Description |
|-----|------|
| gene_symbol | Gene symbol |
| log2_fold_change | Log2 fold change in expression |
| p_value | Statistical significance |
| adjusted_p_value | Adjusted p-value |
| perturbed_gene | Gene that was knocked out |
| cell_type | Cell type |
pathway_enrichment.json){
"KEGG": {
"pathways": [
{
"name": "p53_signaling_pathway",
"p_value": 0.001,
"enrichment_ratio": 3.5,
"genes": ["CDKN1A", "GADD45A", "MDM2"]
}
]
}
}
target_scores.csv)| Column Name | Description |
|-----|------|
| target_gene | Target gene |
| efficacy_score | Knockout effect score (0-1) |
| safety_score | Safety score (0-1) |
| druggability_score | Druggability score |
| novelty_score | Novelty score |
| overall_score | Overall score |
| recommendation | Wet lab recommendation |
volcano_plot.png - Volcano plot showing differentially expressed genesheatmap_degs.png - Heatmap of differentially expressed genespathway_network.png - Pathway network diagramtarget_ranking.png - Target ranking plotin-silico-perturbation-oracle/
├── configs/
│ ├── geneformer_config.yaml # Geneformer model configuration
│ ├── scgpt_config.yaml # scGPT model configuration
│ └── cell_type_mapping.yaml # Cell type mapping
├── data/
│ ├── reference_expression/ # Reference expression profiles
│ └── gene_annotations/ # Gene annotation files
├── models/
│ ├── geneformer_adapter.py # Geneformer interface
│ ├── scgpt_adapter.py # scGPT interface
│ └── base_model.py # Base model abstract class
├── scripts/
│ └── main.py # Main entry script
├── utils/
│ ├── differential_expression.py # Differential expression analysis
│ ├── pathway_enrichment.py # Pathway enrichment
│ ├── target_scoring.py # Target scoring
│ └── visualization.py # Visualization tools
└── examples/
├── single_knockout_example.py
├── batch_screening_example.py
└── cancer_targets_example.py
Target scoring uses a multi-dimensional weighted scoring system:
Overall_Score = w₁ × Efficacy + w₂ × Safety + w₃ × Druggability + w₄ × Novelty
Where:
- Efficacy: Based on number of DEGs and pathway change magnitude
- Safety: Based on essential gene database and toxicity prediction
- Druggability: Based on druggability and structural accessibility
- Novelty: Based on literature and patent novelty
- Weights: w₁=0.35, w₂=0.25, w₃=0.25, w₄=0.15 (configurable)
| Dataset | Description | Consistency | |-------|------|--------| | DepMap CRISPR | Cancer cell line knockout screening | 0.72 (Pearson) | | Perturb-seq | Single-cell perturbation sequencing | 0.68 (AUPRC) | | L1000 CMap | Drug perturbation expression profiles | 0.65 (Spearman) |
# Recommended: Combinatorial knockout screening
results = oracle.predict_combinatorial_ko(
gene_pairs=[
("BCL2", "MCL1"),
("PIK3CA", "PTEN")
],
synergy_threshold=0.3
)
# Recommended: Dose-response simulation
results = oracle.predict_dose_response(
gene="MTOR",
doses=[0.25, 0.5, 0.75, 0.9], # Partial knockout ratios
)
# Export wet lab validation recommendations
oracle.export_validation_guide(
top_targets=10,
include_controls=True,
format="lab_protocol"
)
@software{in_silico_perturbation_oracle_2024,
title={In Silico Perturbation Oracle: Virtual Gene Knockout Prediction},
author={OpenClaw Bioinformatics Team},
year={2024},
url={https://github.com/openclaw/bio-skills}
}
MIT License - See LICENSE file in project root directory
| Risk Indicator | Assessment | Level | |----------------|------------|-------| | Code Execution | Python scripts with tools | High | | Network Access | External API calls | High | | File System Access | Read/write data | Medium | | Instruction Tampering | Standard prompt guidelines | Low | | Data Exposure | Data handled securely | Medium |
# Python dependencies
pip install -r requirements.txt
tools
Generates complete conventional oncology bulk-transcriptome biomarker and hub-gene research designs from a user-provided cancer type and study direction. Always use this skill whenever a user wants to design, plan, or build a tumor bioinformatics study centered on differential expression, prognostic filtering or risk modeling, PPI-based hub-gene prioritization, diagnostic/prognostic evaluation, clinical association, immune infiltration context, methylation context, and optional tissue or cell validation. Covers five study patterns (signature-first prognostic workflow, hub-gene-first biomarker workflow, hybrid signature-to-hub workflow, immune-context biomarker workflow, translational validation workflow) and always outputs four workload configs (Lite / Standard / Advanced / Publication+) with recommended primary plan, step-by-step workflow, figure plan, validation strategy, minimal executable version, publication upgrade path...
development
Generates complete conventional non-oncology bioinformatics research designs from a user-provided disease context, process-related gene family or biological theme, and validation direction. Use when a study centers on multi-dataset bulk transcriptome integration, DEG analysis, process-gene intersection, enrichment analysis, GSEA, PPI hub-gene prioritization, TF/miRNA regulatory networks, ROC-based biomarker evaluation, and immune infiltration analysis. Covers five study patterns (process-DEG discovery, enrichment/GSEA interpretation, hub-gene prioritization, regulatory-network and immune interpretation, multi-layer public validation) and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.
tools
Plans confounder control, variable adjustment logic, and bias mitigation strategies at the protocol stage for clinical, epidemiologic, translational, observational, and biomarker studies. Always use this skill when a user needs to identify major confounders, decide which variables should or should not be adjusted for, compare matching/stratification/weighting approaches, anticipate selection or measurement bias, or pressure-test a study design before execution. Focus on bias sensing, causal structure awareness, variable-role classification, and critical design review rather than generic statistical advice.
testing
Generates complete comparative network-toxicology research designs from a user-provided exposure pair, shared toxic phenotype, and validation direction. Use when a study centers on two related exposures under one outcome and needs target collection, shared-vs-specific target decomposition, enrichment, PPI hub prioritization, docking, optional transcriptomic cross-checks, and conservative mechanistic synthesis. Covers five study patterns and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.