Hello all,
I had a question regarding extracting the top genes from consensus modules in WGCNA. When doing this from single sets of data (datExpr0) the tutorial uses the following code to sort by softConnectivity and exporting n genes:
nTop = 1000
IMConn = softConnectivity(datExpr0[, modProbes]);
top = (rank(-IMConn) <= nTop)
However, I wanted to do this for a multiExpr object and I can't figure out how to do it. Simply replacing "datExpr0" with multiExpr (as I have since this is a consensus analysis) doesn't work:
nTop = 127
> IMConn = softConnectivity(multiExpr[, modProbes]);
Error in multiExpr[, modProbes] : incorrect number of dimensions
> top = (rank(-IMConn) <= nTop)
Error in rank(-IMConn) : object 'IMConn' not found
I understand why this is happening, but I'm not sure how I should get around it. Can I use something other than multiExpr here to calculate softConnectivity? Or do I need to somehow combine the sets into a single set in order to run it?
Thanks very much, any help would be greatly appreciated here.
E