10 votes
Accepted

Where to access the WGCNA tutorial documents: Horvath lab site down

Apologies for the web site trouble, we are working with UCLA to restore the web pages. In the meantime, I uploaded the tutorials to Dropbox at https://www.dropbox.com/scl/fo/4vqfiysan6rlurfo2pbnk/h?...
Peter Langfelder's user avatar
4 votes
Accepted

Question about Co-expression analysis and finding targets for lncRNAs

You have several options to approach this with WGCNA (weighted correlation network analysis). You can run a WGCNA on the combined set, identify modules and select those lncRNAs for further follow-up ...
Peter Langfelder's user avatar
3 votes
Accepted

WGCNA co-expression network analysis with less than 20 samples

It's hard to say without knowing how different the subtypes are. If you do a common WGCNA, you may find modules related to the differences between A and B as well as to drivers of expression variation ...
Peter Langfelder's user avatar
3 votes

How to improve this WGCNA analysis

I took a quick look and don't see anything wrong with the module merging. You could lower the merging threshold a bit - 0.95 is very high, I would use 0.9 or 0.85. Other than that though, really ...
Peter Langfelder's user avatar
3 votes
Accepted

How to find closely related genes for a specific gene from WGCNA modules?

The simplest way is to re-calculate (or load, if saved) the TOM matrix and find the genes with the highest TOM to MALAT1. If you have enough RAM to carry out WGCNA in a single block, you can use ...
Peter Langfelder's user avatar
3 votes
Accepted

Coexpression network analysis

igraph is a serious general network theory framework for any given data science application. It permits full directionality and describes vertices (nodes), edges (...
M__'s user avatar
  • 12.3k
2 votes
Accepted

Hierarchical clustering for outlier detection - single cell RNASeq & WGCNA

For outlier identification I suggest using the sample network approach developed by Oldham et al. It basically amounts to constructing a inter-sample connectivity (assuming ...
Peter Langfelder's user avatar
2 votes
Accepted

Error Code in WGCNA: Dealing with large data sets: block-wise network construction andmodule detection

The problem is that blockwiseModules split your data into (probably 3) blocks, because the default maxBlockSize is 5000 and smaller than the number of genes in your data. If you have enough RAM (16GB ...
Peter Langfelder's user avatar
2 votes
Accepted

WGCNA error codes in Network Construction & moduel detection

Looks like a bug in the code which I will try to hunt down and fix. In the meantime, I would suggest playing with maxBlockSize argument to blockwiseModules. Try increasing it as much as your available ...
Peter Langfelder's user avatar
2 votes

Question about Co-expression analysis and finding targets for lncRNAs

A cursory search to bedtools documentation will reveal the bedtools closest feature - which might be exactly what you are looking in your third question. You can ...
Siddharth's user avatar
  • 345
2 votes
Accepted

WGCNA module preservation analysis

Your question is not clear, you seem to mix the relevant terminology... First, you cannot run WGCNA for individual samples, only for individual conditions (with or without WT, depending on what ...
Peter Langfelder's user avatar
2 votes
Accepted

Tree cut issue in WGCNA

It is likely that the cut heights set in the code (80 and 100*ratio of sample numbers) are too low. Look at the sample trees plotted into a pdf file (SampleClustering.pdf) and note the merging heights....
Peter Langfelder's user avatar
2 votes
Accepted

Parallelizing WGCNA k-means clustering and merging smaller clusters

The bad news is that, indeed, projectiveKMeans is not parallelized and I am not sure how much of it is (easily) parallelizable. The good news is that with 15k features (genes) and 96GB RAM you don't ...
Peter Langfelder's user avatar
2 votes
Accepted

WGCNA: Problem with selecting soft threshold

Don't worry about it too much. I would go with power 8 based on my general experience (also reflected in WGCNA FAQ) and on the mean connectivity around 50 and median around 20, which seems reasonable ...
Peter Langfelder's user avatar
2 votes

Weighted Network Analysis Book by Steve Horvath, taking the power of a matrix

You CAN calculate M^b for b being float number, complex number or even another matrix. As well as you can calculate exp(M), log(M), sin(M) whatever... That is very standard for math people. Let me ...
Alexander Chervov's user avatar
2 votes
Accepted

Importing a WGCNA co-expression network into a networkX graph in Python

You can use exportNetworkToCytoscape or exportNetworkToVisANT to generate and egde list file with the two nodes at the ends and ...
Peter Langfelder's user avatar
2 votes

Find enriched processes in modules obtained by WGCNA

Well, not all modules will have significant enrichment in gene sets such as GO terms or KEGG pathways. In my experience, the smaller modules are often not significantly enriched. They could be the ...
Peter Langfelder's user avatar
2 votes
Accepted

Running GSEA or comparable analysis with multiple variable interaction?

I'm not sure I understand "I would like to run GSEA or a similar analysis to find WGCNCA clusters that differ based on the interaction between the two main variables". I would run an ...
Peter Langfelder's user avatar
2 votes

Is it possible to integrate multiple gene expression datasets and use it for WGCNA?

Yes, if the expression datasets are from the same platform, you can merge all the datasets for common genes among them. However, if they are from different platforms then some batch correction needs ...
Nitesh Shriwash's user avatar
2 votes
Accepted

Extracting P-Values for Co-Expressed Genes Within WGCNA Modules

The simplest way is to calculate the correlation matrix of genes in the module you want and use that as input to exportNetworkToCytoscape. Something like this: <...
Peter Langfelder's user avatar
1 vote

WCGNA - Relate modules with Y features when the % of variance explained of each eigengen is low

Part 1 Just to clarify on the specific issue of using PC1 alone given the reported result ... Without knowing the underlying ecology, which is important, 30% is too low to any draw conclusions in PCA-...
M__'s user avatar
  • 12.3k
1 vote

How can to validate the presence of a certain type of cells in a single cell dataset?

I think the typical way to do this would be to identify a small number of marker genes whose presence and absence is specific for that cell type.
swbarnes2's user avatar
  • 1,925
1 vote

Tutorial for the WGCNA: changes in heatmap colours

You can add a color palette to the plot. e.g. ...
CorteZero's user avatar
  • 109
1 vote

How to calculate module-trait relationship when trait data is in binary format?

Answer from @m, converted from comment: Personally I'd build a tree. Whats your question patients or the relationship between RNAseq 'signatures'? Its not the definitive analysis, but its good mining. ...
1 vote

Which module to select for Pathway analysis based on Module trait correlation and pvalue?

If you can run pathway analysis programmatically on all modules, yes, do it on all modules. Otherwise, select the modules with strongest associations with each subtype, both positive and negative. I ...
Peter Langfelder's user avatar
1 vote

no expression for hub genes identified in wgcna

It could be that your modules group together genes (over)expressed in only certain small groups of samples that may be biologically relevant. You would need to check whether the samples in which the ...
Peter Langfelder's user avatar
1 vote
Accepted

WGCNA hub genes error

The most likely culprit here is that your expression data (the datExpr input to chooseTopHubInEachModule) has no colnames. Check that your data do have appropriate column names. Also check that the ...
Peter Langfelder's user avatar
1 vote
Accepted

Does module size decrease as the number of samples increase in WGCNA?

The biggest difference a large number of samples makes is that you can usually decrease the soft thresholding power. If you use power 6 (or 12 for a signed network), try decreasing it to 3 or even 2 (...
Peter Langfelder's user avatar
1 vote

Identifying mutually **exclusive** gene sets

"Mutually exclusive" is not a precise statistical term because it could be seen as independence. Anyway if truly mutually exclusive AND their behaviour follows periodicity, i.e. sine waves, which it ...
M__'s user avatar
  • 12.3k
1 vote
Accepted

Module preservation and hub genes finding

Simply select the module(s) you are interested in and look for hub genes using the standard calculations. Having done a module preservation analysis does not change the procedure in the slightest.
Peter Langfelder's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible