bulk-wgcna-analysis-with-omicverse
Bulk WGCNA analysis with omicverse
Overview
Activate this skill for users who want to reproduce the WGCNA workflow from t_wgcna.ipynb. It guides you through loading expression data, configuring PyWGCNA, constructing weighted gene co-expression networks, and inspecting modules of interest.
Instructions
- Prepare the environment
- Import
omicverse as ov,scanpy as sc,matplotlib.pyplot as plt, andpandas as pd. - Set plotting defaults via
ov.plot_set().
- Import
- Load and filter expression data
- Read expression matrices (e.g., from
expressionList.csv). - Calculate median absolute deviation with
from statsmodels import robustandgene_mad = data.apply(robust.mad). - Keep the top variable genes (e.g.,
data = data.T.loc[gene_mad.sort_values(ascending=False).index[:2000]]).
- Read expression matrices (e.g., from
- Initialise PyWGCNA
- Create
pyWGCNA_5xFAD = ov.bulk.pyWGCNA(name=..., species='mus musculus', geneExp=data.T, outputPath='', save=True). - Confirm
pyWGCNA_5xFAD.geneExprlooks correct before proceeding.
- Create
- Preprocess the dataset
- Run
pyWGCNA_5xFAD.preprocess()to drop low-expression genes and problematic samples.
- Run
- Construct the co-expression network
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