R WGCNA - error in modulePreservation(): duplicated row.names not allowed
3
0
Entering edit mode
6.2 years ago
feltrin88 • 0

I'm having some problems with the modulePreservation function of WGCNA (https://www.rdocumentation.org/packages/WGCNA/versions/1.63/topics/modulePreservation). When I use it with my multiData dataframes (gene expression from case and control groups), I'm having a error of duplicated row.names. In the past, I was able to perform this step with no problems at all.

Ps. multiExpr = multiData ; control_colors = multiColor

> modulePreservation(multiExpr, control_colors, dataIsExpr=T, referenceNetworks=1, nPermutations=100, randomSeed=1, quickCor=0, verbose=3, networkType="unsigned")


.checking data for excessive amounts of missing data..
     Flagging genes and samples with too many missing values...
      ..step 1
     Flagging genes and samples with too many missing values...
      ..step 1
  ..unassigned 'module' name: grey 
  ..all network sample 'module' name: gold
  ..calculating observed preservation values
Error in `.rowNamesDF<-`(x, value = value) : 
  duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique values when setting 'row.names': ‘A1CF’, ‘A2M’, ‘AADAC’, ‘AARS’, ‘AASDHPPT’, ‘ABCA12’, ‘ABCA3’, ‘ABCA4’, ‘ABCA8’, ‘ABCB11’, ‘ABCB4’, ‘ABCB9’, ‘ABCC1’, ‘ABCC3’, ‘ABCC6’, ‘ABCD2’, ‘ABCD4’, ‘ABCE1’, ‘ABCF3’, ‘ABCG1’, ‘ABCG2’, ‘ABHD10’, ‘ABHD2’, ‘ABHD4’, ‘ABHD6’, ‘ABI2’, ‘ABL1’, ‘ABL2’, ‘ACAA2’, ‘ACACA’, ‘ACACB’, ‘ACAD10’, ‘ACAD8’, ‘ACADL’, ‘ACADSB’, ‘ACADVL’, ‘ACAN’, ‘ACAP1’, ‘ACAT1’, ‘ACBD3’, ‘ACBD4’, ‘ACCN3’, ‘ACD’, ‘ACE2’, ‘ACHE’, ‘ACIN1’, ‘ACO2’, ‘ACOT7’, ‘ACOT8’, ‘ACOT9’, ‘ACOX3’, ‘ACOXL’, ‘ACPP’, ‘ACR’, ‘ACRV1’, ‘ACSF2’, ‘ACSL3’, ‘ACSL5’, ‘ACSL6’, ‘ACSM3’, ‘ACTB’, ‘ACTC1’, ‘ACTL6B’, ‘ACTL7A’, ‘ACTL8’, ‘ACTN2’, ‘ACTN3’, ‘ACTR1A’, ‘ACTR2’, ‘ACTR3B’, ‘ACTR5’, ‘ACTR8’, ‘ACVR1’, ‘ACVRL1�� [... truncated]

I already checked the row.names and colnames of my multiExpr files, and all are unique values

sum(duplicated(row.names(multiExpr$Control$data)))
sum(duplicated(row.names(multiExpr$Case$data)))
sum(duplicated(colnames(multiExpr$Control$data)))
sum(duplicated(colnames(multiExpr$Case$data)))

My R version is R version 3.5.1 (2018-07-02)

WGCNA R • 3.5k views
ADD COMMENT
0
Entering edit mode
6.2 years ago
Dunja ▴ 10

Hi,

I have the same problem! Also the newest version of R. Can anyone help?

ADD COMMENT
0
Entering edit mode
6.2 years ago

Thanks for the report. I confirmed the bug and will fix the function soon.

ADD COMMENT
0
Entering edit mode

Hi has the bug been fixed? I just want to make sure that I'm not doing something wrong. Thanks!

ADD REPLY
0
Entering edit mode

I also have this problem! please let us know when the bug is fixed.

ADD REPLY
0
Entering edit mode

I just tried to run my re-run my code from months back and ran into this error. Has there been any headway on this? Similar to the initial post, I am running the latest version of R (3.5.1.) and this has not been a problem before.

ADD REPLY
0
Entering edit mode

Downloaded the latest resease version WGCNA 1.66, and the bug is fixed. Thanks!

ADD REPLY
0
Entering edit mode
6.1 years ago
jjt3f2188 • 0

I'm running WGCNA 1.63 on R 3.4.3 and the following fixed the problem for me:

Before calling modulePreservation:

  1. copy the code for the signedKME function (available here: https://rdrr.io/cran/WGCNA/src/R/Functions.R) into a script,
  2. replace '..minNSamples' with 4 (which is the value it should have anyway) and
  3. redefine the function.

Now modulePreservation() should work.

The error seems to occur here: modulePreservation() calls .modulePreservationInternal() calls .coreCalcForExpr calls signedKME evaluates ..minNSamples

ADD COMMENT

Login before adding your answer.

Traffic: 1611 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6