Search
Question: WGCNA: Exporting MEs with Subject/Sample Identification
0
12 months ago by
Tox_scientist200 wrote:

I am trying to export module eigengene values, calculated using 'Tutorial I.2a. Automatic network construction and module detection'.

I can extract the MEs using:

MEs = net\$MEs

Which contains the information I need - MEs per subject (sample). However, the sample identification is lost, and replaced with numbered values. How can I tie these results back to the original sample information? Are these simply listed in the same order as the originally imported samples?

Thank you.

modified 12 months ago • written 12 months ago by Tox_scientist200
0
12 months ago by
United States
Peter Langfelder1.5k wrote:

The simplest way to do it, assuming your expression data carry valid rownames:

rownames(MEs) = rownames(datExpr)

(replace datExpr with the object that carries our expression data).

More generally, you can add a column to MEs that has sample ID, or multiple columns that have all the information you need, from the datTraits data frame (calculated in Section 1 of the tutorial).

HTH,

Peter

0
12 months ago by
Tox_scientist200 wrote:

Thank you for the quick response, Peter. This worked perfectly. Much appreciated!