bulk-rna-seq-batch-correction-with-combat
Bulk RNA-seq batch correction with ComBat
Overview
Apply this skill when a user has multiple bulk expression matrices measured across different batches and needs to harmonise them
before downstream analysis. It follows t_bulk_combat.ipynb, w
hich demonstrates the pyComBat workflow on ovarian cancer microarray cohorts.
Instructions
- Import core libraries
- Load
omicverse as ov,anndata,pandas as pd, andmatplotlib.pyplot as plt. - Call
ov.ov_plot_set()(aliasedov.plot_set()in some releases) to align figures with omicverse styling.
- Load
- Load each batch separately
- Read the prepared pickled matrices (or user-provided expression tables) with
pd.read_pickle(...)/pd.read_csv(...). - Transpose to gene × sample before wrapping them in
anndata.AnnDataobjects soadata.obsstores sample metadata. - Assign a
batchcolumn for every cohort (adata.obs['batch'] = '1','2', ...). Encourage descriptive labels when availa ble.
- Read the prepared pickled matrices (or user-provided expression tables) with
- Concatenate on shared genes
- Use
anndata.concat([adata1, adata2, adata3], merge='same')to retain the intersection of genes across batches. - Confirm the combined
adatareports balanced sample counts per batch; if not, prompt users to re-check inputs.
- Use
More from starlitnightly/omicverse
single-cell-downstream-analysis
AUCell pathway scoring, metacell DEG, scDrug response, SCENIC regulons, cNMF programs, and NOCD community detection in OmicVerse.
50single-cell-annotation-skills-with-omicverse
Cell type annotation: SCSA, MetaTiME, CellVote consensus, CellMatch, GPTAnno, weighted KNN label transfer in OmicVerse.
49bulk-rna-seq-deseq2-analysis-with-omicverse
PyDESeq2 differential expression: ID mapping, DE testing, fold-change thresholding, and GSEA enrichment visualization in OmicVerse.
47single-cell-preprocessing-with-omicverse
Single-cell QC, normalization, HVG detection, PCA, neighbor graph, UMAP/tSNE embedding pipelines in OmicVerse (CPU/GPU).
44single-cell-multi-omics-integration
Multi-omics integration: MOFA factor analysis, GLUE unpaired alignment, SIMBA batch correction, TOSICA label transfer, StaVIA trajectory. Covers scRNA+scATAC paired/unpaired workflows.
41data-export-pdf
Create professional PDF reports with text, tables, and embedded images using reportlab. Works with ANY LLM provider (GPT, Gemini, Claude, etc.).
38