Hi,
When I use the $moduleEigengene function, I get the following list:
MEmagenta MEgreen MElightyellow MEroyalblue MEyellow MEturquoise MElightcyan
F2_15 -0.02011839 0.10710884 -0.016934090 0.32672467 0.16785401 -0.063904392 0.3517906757
F2_66 -0.05859031 0.02186919 -0.426863142 -0.26950299 -0.29492186 0.559808442 0.3414648550
F2_78 -0.03126631 0.10380786 0.019135631 -0.02660238 -0.38110715 -0.318314637 -0.0483743722
F2_86 0.38744425 0.17416983 0.261450692 0.23142830 0.11424128 0.100530667 -0.1398993598
F2_88 -0.01556975 -0.16161807 -0.230524538 0.40320534 0.07030380 0.090658505 -0.2378646388
etc. What does this matrix mean? How can I get just the single Eigengene for each module?
Also, how do I reduce the number of samples in the following function:
datExpr = datExpr0[keepSamples, ]
I want all the genes in the 1st Principal Component which contribute to the Eigengene of a specific module, say black module.
The genes in a given module that mostly contribute the 1st PC are the ones with the highest module memership (
kME
), the hub genes. To calculatekME
you could use the function signedKME. Alternatively, you can use intramodularConnectivity to find out which genes have the highest intramodular connectivity aka hub genes.Thank you! So as per the documentation of signedKME, the input value (datExpr) would have to be the original expression matrix? So how would this be different from the datME?
In
signedKME
you correlates the expression of a genes with the 1st PC (ME) of every module. The inputs forsignedKME
are the expression matrix (datExpr
) and the data frame containing module eigengenesAs per my understanding, there is no single gene that is a module eigengene, but this is an abstract numerical value. So this dataframe would contain just the values for module eigengenes as columns and the samples as rows? if so, wouldnt there be lesser number of samples in datME than the original expression matrix?
In WGCNA genes are clustered according to their expression profiles across all your samples. Therefore, the number of samples in
datME
is the same ofdatExpr
below is what part of my datExpr looks like:
below is what part of my datME looks like:
is this correct?
Yes, it is. Does it look wrong for you?
thank you, it looks about right. Is there a threshold for the kME or intramodularConnectivity to select the genes that contribute to the 1st PC?
Unfortunately no. I usually detect the interesting modules by correlating the 1st PC with my experimental variables. Once I found the 'interesting' modules, I perform an enrichment analysis, and then look at the hubs genes to verify if the highly connected genes are part of the enriched terms (KEGG pathway of Gene Ontology)
in that case, on what basis would I select the genes that contribute to my 1st PC?
Also, this is part of the moduleEigenges function and im using it to see if I can use it to find the genes that contribute to the eigengene; was wondering if you could throw more light on it. my datModule would consist of sample as rows and eigengenes belonging to a particular module as columns:
svd1 = svd(datModule, nu = min(n, p, nPC), nv = min(n, p, nPC))
Tried the signedKME and looked at all the data/info but keep getting:
Error in colVars(datExpr, na.rm = TRUE) : Argument 'x' must be of type logical, integer or numeric, not 'character'.
Documentation and other sources dont seem to be able to help with this particular error.
there is a problem with datExpr. Your matrix is not numeric. Are you following the tutorial?
Yes. My datExpr and datME are what ive posted above-thats what it looks like from the tutorial. do i need to remove the sample names and any other character data and make both datExpr and datME with just numeric?
Hi, from the tutorial I was not able to replicate the error so I guess you missed some step. I can not resolve it. You could create a new post
could you please show me what your code and data matrices look like for calculating signedKME and IntramodularConnectivity?
I was able to resolve this issue by removing the index/sample names at the beginning of each row which were causing the issue because of the presence of a character.
could you explain more on how to correlate eigengene with experimental variables?
plot
datTraits
is a binary matrix of your experimental variables. The input matrix used to createdatTraits
should look like this:How to create
datTraits
Thank you so much for your help. Really appreciate it!