Assist Claude in running PyWGCNA through omicverse—preprocessing expression matrices, constructing co-expression modules, visualising eigengenes, and extracting hub genes.
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.
omicverse as ov, scanpy as sc, matplotlib.pyplot as plt, and pandas as pd.ov.plot_set().expressionList.csv).from statsmodels import robust and gene_mad = data.apply(robust.mad).data = data.T.loc[gene_mad.sort_values(ascending=False).index[:2000]]).pyWGCNA_5xFAD = ov.bulk.pyWGCNA(name=..., species='mus musculus', geneExp=data.T, outputPath='', save=True).pyWGCNA_5xFAD.geneExpr looks correct before proceeding.pyWGCNA_5xFAD.preprocess() to drop low-expression genes and problematic samples.pyWGCNA_5xFAD.calculate_soft_threshold().calculating_adjacency_matrix() and calculating_TOM_similarity_matrix().calculate_geneTree(), calculate_dynamicMods(kwargs_function={'cutreeHybrid': {...}}).calculate_gene_module(kwargs_function={'moduleEigengenes': {'softPower': 8}}).plot_matrix(save=False) if needed.get_sub_module([...], mod_type='module_color').get_sub_network(mod_list=[...], mod_type='module_color', correlation_threshold=0.2) and plot them via plot_sub_network(...).updateSampleInfo(path='.../sampleInfo.csv', sep=',').setMetadataColor(...).analyseWGCNA() to compute module–trait statistics.plotModuleEigenGene(module, metadata, show=True) and barplotModuleEigenGene(...).top_n_hub_genes(moduleName='lightgreen', n=10).save=False to avoid writing many intermediate files.deepSplit or softPower.t_wgcna.ipynbdata/5xFAD_paper/reference.md