bulk-rna-seq-differential-expression-with-omicverse
Guide Claude through omicverse's bulk RNA-seq DEG pipeline, from gene ID mapping and DESeq2 normalization to statistical testing, visualization, and pathway enrichment. Use when a user has bulk count matrices and needs differential expression analysis in omicverse.
Install
mkdir -p .claude/skills/bulk-rna-seq-differential-expression-with-omicverse && curl -L -o skill.zip "https://mcp.directory/api/skills/download/4143" && unzip -o skill.zip -d .claude/skills/bulk-rna-seq-differential-expression-with-omicverse && rm skill.zipInstalls to .claude/skills/bulk-rna-seq-differential-expression-with-omicverse
About this skill
Bulk RNA-seq differential expression with omicverse
Overview
Follow this skill to run the end-to-end differential expression (DEG) workflow showcased in t_deg.ipynb. It assumes the user provides a raw gene-level count matrix (e.g., from featureCounts) and wants to analyse bulk RNA-seq cohorts inside omicverse.
Instructions
- Set up the session
- Import
omicverse as ov,scanpy as sc, andmatplotlib.pyplot as plt. - Call
ov.plot_set()so downstream plots adopt omicverse styling.
- Import
- Prepare ID mapping assets
- When gene IDs must be converted to gene symbols, instruct the user to download mapping pairs via
ov.utils.download_geneid_annotation_pair()and store them undergenesets/. - Mention the available prebuilt genomes (T2T-CHM13, GRCh38, GRCh37, GRCm39, danRer7, danRer11) and that users can generate their own mapping from GTF files if needed.
- When gene IDs must be converted to gene symbols, instruct the user to download mapping pairs via
- Load the raw counts
- Read tab-delimited featureCounts output with
ov.pd.read_csv(..., sep='\t', header=1, index_col=0). - Strip trailing
.bamsegments from column names using list comprehension so sample IDs are clean.
- Read tab-delimited featureCounts output with
- Map gene identifiers
- Run
ov.bulk.Matrix_ID_mapping(counts_df, 'genesets/pair_<GENOME>.tsv')to replacegene_identries with gene symbols.
- Run
- Initialise the DEG object
- Create
dds = ov.bulk.pyDEG(mapped_counts). - Handle duplicate gene symbols with
dds.drop_duplicates_index()to keep the highest expressed version.
- Create
- Normalise and estimate size factors
- Execute
dds.normalize()to calculate DESeq2 size factors, correcting for library size and batch differences.
- Execute
- Run differential testing
- Collect treatment and control replicate labels into lists.
- Call
dds.deg_analysis(treatment_groups, control_groups, method='ttest')for the default Welch t-test. - Offer optional alternatives:
method='edgepy'for edgeR-like tests andmethod='limma'for limma-style modelling.
- Filter and threshold results
- Note that lowly expressed genes are retained by default; filter using
dds.result.loc[dds.result['log2(BaseMean)'] > 1]when needed. - Set dynamic fold-change and significance cutoffs via
dds.foldchange_set(fc_threshold=-1, pval_threshold=0.05, logp_max=6)(fc_threshold=-1auto-selects based on log2FC distribution).
- Note that lowly expressed genes are retained by default; filter using
- Visualise differential expression
- Produce volcano plots with
dds.plot_volcano(title=..., figsize=..., plot_genes=... or plot_genes_num=...)to highlight key genes. - Generate per-gene boxplots using
dds.plot_boxplot(genes=[...], treatment_groups=..., control_groups=..., figsize=..., legend_bbox=...); adjust y-axis tick labels if required.
- Produce volcano plots with
- Perform pathway enrichment (optional)
- Download curated pathway libraries through
ov.utils.download_pathway_database(). - Load genesets with
ov.utils.geneset_prepare(<path>, organism='Mouse'|'Human'|...). - Build the DEG gene list from
dds.result.loc[dds.result['sig'] != 'normal'].index. - Run enrichment with
ov.bulk.geneset_enrichment(gene_list=deg_genes, pathways_dict=..., pvalue_type='auto', organism=...). Encourage users without internet access to provide abackgroundgene list. - Visualise single-library results via
ov.bulk.geneset_plot(...)and combine multiple ontologies usingov.bulk.geneset_plot_multi(enr_dict, colors_dict, num=...).
- Download curated pathway libraries through
- Document outputs
- Suggest exporting
dds.resultand enrichment tables to CSV for downstream reporting. - Encourage users to save figures generated by matplotlib (
plt.savefig(...)) when running outside notebooks.
- Suggest exporting
- Defensive validation
# Before DEG: verify treatment/control groups exist as column names all_cols = set(dds.result.columns) if hasattr(dds, 'result') else set(counts_df.columns) for g in treatment_groups + control_groups: assert g in all_cols, f"Sample '{g}' not found in count matrix columns" # Verify groups don't overlap assert not set(treatment_groups) & set(control_groups), "Treatment and control groups must not overlap" - Troubleshooting tips
- Ensure sample labels in
treatment_groups/control_groupsexactly match column names post-cleanup. - Verify required packages (
omicverse,pyComplexHeatmap,gseapy) are installed for enrichment visualisations. - Remind users that internet access is required the first time they download gene mappings or pathway databases.
- Ensure sample labels in
Examples
- "I have a featureCounts matrix for mouse tumour samples—normalize it with DESeq2, run t-test DEG, and highlight the top 8 genes in a volcano plot."
- "Use omicverse to compute edgeR-style differential expression between treated and control replicates, then run GO enrichment on significant genes."
- "Guide me through converting Ensembl IDs to symbols, performing limma DEG, and plotting boxplots for Krtap9-5 and Lef1."
References
- Detailed walkthrough notebook:
t_deg.ipynb - Sample count matrix for testing:
sample/counts.txt - Quick copy/paste commands:
reference.md
More by Starlitnightly
View all skills by Starlitnightly →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversRaindrop: AI DevOps to convert Claude Code into an infrastructure-as-code full-stack deployment platform, automating app
Boost productivity with Task Master: an AI-powered tool for project management and agile development workflows, integrat
Connect Blender to Claude AI for seamless 3D modeling. Use AI 3D model generator tools for faster, intuitive, interactiv
Send and receive WhatsApp messages directly from Claude and other AI assistants. Search conversations, manage contacts,
Use iOS Simulator for testing with tools like UI interaction and device info retrieval. Perfect as an iPhone emulator fo
Control any ROS1 or ROS2 robot with natural language using ROS MCP Server—AI-powered, code-free, real-time monitoring an
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.