View source: R/Analyze_Module_Preservation.R
getModulePreservation | R Documentation |
getModulePreservation()
examines module replication between a
reference and a test data set by estimating various preservation statistics,
which are then saved as a .txt file. Correlations are performed using either
pearson
or bicor
methods.
getModulePreservation(
meth_disc,
regions_disc,
meth_rep,
regions_rep,
corType = c("pearson", "bicor"),
maxPOutliers = 0.1,
nPermutations = 100,
save = TRUE,
file = "Module_Preservation_Stats.txt",
verbose = TRUE
)
meth_disc |
A |
regions_disc |
A |
meth_rep |
A |
regions_rep |
A |
corType |
A |
maxPOutliers |
A |
nPermutations |
A |
save |
A |
file |
A |
verbose |
A |
Identical sets of regions should be assessed and assigned modules within
discovery (reference) and replication (test) data sets, though the replication
regions may be a subset of the discovery regions due to low coverage. It's
also recommended to filter CpGs so identical loci are also assessed within
regions. Network parameters should be as similar as possible, although
modules should be identified independently between the discovery and
replication datasets. Preservation statistics are calculated by
WGCNA::modulePreservation()
, with corFnc
set to either cor
or
bicor
. More information is given in the documentation for
WGCNA::modulePreservation()
.
A data.frame
giving preservation statistics for each module in
the discovery data set.
getModules()
to build a comethylation network and identify
modules of comethylated regions.
plotModulePreservation()
to visualize module preservation
statistics.
## Not run:
# Calculate Module Preservation
regions_disc <- modules_disc$regions
regions_rep <- modules_rep$regions
preservation <- getModulePreservation(methAdj_disc,
regions_disc = regions_disc,
meth_rep = methAdj_rep,
regions_rep = regions_rep,
corType = "pearson",
file = "Module_Preservation_Stats.txt")
# Visualize Module Preservation
plotModulePreservation(preservation, file = "Module_Preservation_Plots.pdf")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.