Question: Module preservation WGCNA
0
gravatar for bekah
12 months ago by
bekah20
bekah20 wrote:

Hi,

I have a single network that I have created using WGCNA, is it possible to test module preservation on just the one network. I tried using the following:

#FOR MODULE PRESERVATION

data=read.csv("preservation.csv", header=TRUE) # expression data file, with columns = genes and rows = samples

moduledata=read.csv("modulelist.csv", header=TRUE) # module file, with two columns, one for geneID and one for assigned module
colorsmodule = moduledata$Module

multiExpr=data #this is the expression data
colorList = colorsmodule # this is the list of modules

system.time( {
  mp = modulePreservation(multiExpr, colorList, referenceNetworks=1,
                          nPermutations = 1000,
                          networkType = "signed",
                          randomSeed = 2905,
                          quickCor=0,
                          verbose = 4, 
                          indent = 0)

but it gave the error:

Error in multiExpr[[set]]$data : $ operator is invalid for atomic vectors
Timing stopped at: 2.15 0 2.17 

Which I assume is because it is looking for two sets to compare? Should I just subset my data to say just 5 samples and input this? Or is it just not possible to test for robustness in this case?

Best wishes,

Rebekah

ADD COMMENTlink modified 12 months ago by Peter Langfelder2.3k • written 12 months ago by bekah20
Answer: Module preservation WGCNA
0
gravatar for Peter Langfelder
12 months ago by
United States
Peter Langfelder2.3k wrote:

Create a multi-data structure with two copies of your data, perhaps like this:

multiExpr = multiData(Set1 = data, Set2 = data)
colorList = list(Set1 = colorsmodule)

Then run modulePreservation with this input and look at module quality scores in the output (ignore the preservation metrics).

Peter

ADD COMMENTlink written 12 months ago by Peter Langfelder2.3k

Hi, sorry for the delay in responding I have just moved house! Thank you very much, I will try this ASAP!

ADD REPLYlink written 12 months ago by bekah20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 361 users visited in the last hour