ModulePreservation: a easy method for Module Preservation in FastWGCNA pipeline

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/BI_ModulePreservation.R

Description

If you want to test the preservation of modules created by FastWGCNA and you have also another datasets as validataion cohorts,ModulePreservation would be a nice function for this mission.

Usage

1
2
3
4
ModulePreservation(object, valid.matrix = list(), nPermutations = 50,
  randomSeed = 1, quickCor = 0, verbose = 3, cutoff.Z = 10,
  report = T, width = 15, height = 7.5, save.path = "WGCNA",
  names = "love")

Arguments

object

a result from FastWGCNA

valid.matrix

a list of expression matrix with genes rows and sample cols.

nPermutations

specifies the number of permutations that will be calculated in the permutation test.

randomSeed

seed for the random number generator. If NULL, the seed will not be set. If non-NULL and the random generator has been initialized prior to the function call, the latter's state is saved and restored upon exit

quickCor

number between 0 and 1 specifying the handling of missing data in calculation of correlation. Zero means exact but potentially slower calculations; one means potentially faster calculations, but with potentially inaccurate results if the proportion of missing data is large. See cor for more details.

verbose

integer level of verbosity. Zero means silent, higher values make the output progressively more and more verbose.

cutoff.Z

Default is 10.10 is efficient enought and should not be changed.

report

whether to do a plot report

save.path

the space of the save file.Default is "WGCNA"

names

part of saved files name

setLabels

the names of expression matrix in valid.matrix.

Details

I.The expression matrix in object would be used as a training cohorts in module preservation evaluation. II.nPermutations = 200 is a usual method but it would be time-consuming.It seems that nPermutations = 50 would be stable enough for module presevation exploration.

Value

LuckyWGCNA object

Author(s)

Weibin Huang<654751191@qq.com>

See Also

FastWGCNA.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## This is a simulative process and available only with CORRECT VARIABLES
object = wgcna;rm(wgcna);gc()
valid.matrix = list(Valid1 = rna.fpkm.tumor,
                    Valid2 = rna.fpkm.tumor)
result_MP <- ModulePreservation(object,
                                valid.matrix,
                                nPermutations = 20,
                                cutoff.Z = 10,
                                report = T,
                                width = 15,height = 7.5,
                                save.path = "WGCNA-test",
                                names = "love")

shijianasdf/BasicBioinformaticsAnalysisFromZhongShan documentation built on Jan. 3, 2020, 10:08 p.m.