I'm trying to compare 2 networks that I've created as a toy dataset from WGCNA's tutorial section I'm not exactly sure how to interpret the resulting data since there is so much content. `X_A`

and `X_B`

are adjacency matrices while `modules_A`

and `modules_B`

are the module assignments (starting at 0 and ascending with the outlier module set as -1). I want to look at the differences between modules and which modules are significant to the experimental/treatment phenotype network represented here as `Male`.

**Can somebody answer the following questions about this functions output?**

**Basing these questions off of the [documentation](**https://rdrr.io/cran/WGCNA/man/modulePreservation.html)

(1) What is the meaning of: `all network sample 'module' name: 0.1`

(2) How is `quality` and `preservation` measured?

(3) What `accuracy` is this referring to in the output?

(4) What are `referenceSeparability` and `testSeparability`?

(5) Does this function calculate significance for modules that are indicative of the test network?

Here is my code below for running the function with my 2 precomputed adjacency matrices:

```
# Read DataFrames
read_dataframe = function(path, sep="\t") {
df = read.table(path, sep=sep, row.names=1, header = TRUE, check.names=FALSE)
return(df)
}
# Data Overview
cat("Similarity", dim(X_A), "\nModule assignment", dim(A_modules), "\nModule Number Range", min(A_modules), max(A_modules))
#Similarity 375 375
#Module assignment 375 1
#Module Number Range 0 8
cat("Similarity", dim(X_B), "\nModule assignment", dim(B_modules), "\nModule Number Range", min(B_modules), max(B_modules))
#Similarity 375 375
#Module assignment 375 1
#Module Number Range 0 21
# Load data
library(WGCNA)
X_A = read_dataframe("./Google/Prototype/Data/FemaleLiver-Data/X_A.corr.abs.tsv")
X_A = data.matrix(X_A)
X_B = read_dataframe("./Google/Prototype/Data/FemaleLiver-Data/X_B.corr.abs.tsv")
X_B = data.matrix(X_B)
A_modules = read_dataframe("./Google/Prototype/Data/FemaleLiver-Data/X_A.corr.abs.modules.tsv")
B_modules = read_dataframe("./Google/Prototype/Data/FemaleLiver-Data/X_B.corr.abs.modules.tsv")
# Format data
multiExpr = list(
"Female" = list(data=X_A),
"Male" = list(data=X_B)
)
multiColor = list(
"Female" = A_modules[rownames(X_A),],
"Male" = B_modules[rownames(X_B),]
)
mp = modulePreservation(multiExpr, multiColor,
referenceNetworks = 1,
nPermutations = 10,
randomSeed = 0,
verbose = 3,
dataIsExpr=FALSE,
checkData = FALSE,
greyName=-1
)
..unassigned 'module' name: -1
..all network sample 'module' name: 0.1
..calculating observed preservation values
..calculating permutation Z scores
..Working with set 1 as reference set
....working with set 2 as test set
......working on permutation 1
......working on permutation 2
......working on permutation 3
......working on permutation 4
......working on permutation 5
......working on permutation 6
......working on permutation 7
......working on permutation 8
......working on permutation 9
......working on permutation 10
```