This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to match Ref. and Test data set genes for module preservation based on WGCNA?

Hi, I study module preservation based on WGCNA. In the tutorial of module preservation at MouseLiver, the reference data set has 3421 genes and test data set has 3600 genes. So, before running modulepreservation() in WGCNA, that’s necessary to use all.equal() for exact matching between ref. data set and test data set genes. In that tutorial, the number of reference genes are less than test data set genes. also, all ref. genes were found in test data set genes. In my study, "datExprRef" data set as reference has 3000 genes and "my_test" data set has 21000 genes which just 2815 genes are matched to my reference genes. When I run below code for matching columns of 2 data set, finally I get data set for test (datExprTest) by 3000 genes.but 185 columns of "datExprTest" are NA.

ref2test = match(colnames(datExprRef), colnames(my_test));
table(is.finite(ref2test))
FALSE  TRUE 
  185     2815
datExprTest = my_test[ ,ref2test];
all.equal(colnames(datExprRef), colnames(datExprTest))

when I run all.equal(), I get below message in console:

[1] "'is.NA' value mismatch: 185 in current 0 in target"

It means, my ref data set genes and test data set genes aren't match. I appreciate if anybody shares his/her comment with me. what should I do?

wgcna module preservation

0 answers

No answers yet.

Log in to answer this question.