Learn R Programming

NetRep (version 1.0.2)

PermutationProcedure: Multithreaded permutation procedure for module preservation statistics

Description

Multithreaded permutation procedure for module preservation statistics

Usage

PermutationProcedure(discProps, tData, tCorr, tNet, moduleAssignments, modules, nPermutations, nCores, nullHypothesis, verbose, vCat)

Arguments

discProps
a list of intermediate properties calculated in the discovery dataset by IntermediateProperties.
tData
scaled data matrix from the test dataset.
tCorr
matrix of correlation coefficients between all pairs of variables/nodes in the test dataset.
tNet
adjacency matrix of network edge weights between all pairs of nodes in the test dataset.
moduleAssignments
a named character vector containing the module each node belongs to in the discovery dataset.
modules
a character vector of modules for which to calculate the module preservation statistics.
nPermutations
the number of permutations from which to generate the null distributions for each statistic.
nCores
the number of cores that the permutation procedure may use.
nullHypothesis
either "overlap" or "all".
verbose
if 'true', then progress messages are printed.
vCat
the vCat function must be passed in so that it can be called for output logging.

Value

a list containing a matrix of observed test statistics, and an array of null distribution observations.

Details

Input expectations: Note that this function expects all inputs to be sensible, as checked by the R function 'checkUserInput' and processed by 'modulePreservation'. These requirements are:
  • The ordering of node names across 'tData', 'tCorr', and 'tNet' is consistent.
  • The columns of 'tData' are the nodes.
  • 'tData' has been scaled by 'Scale'.
  • 'tCorr' and 'tNet' are square matrices, and their rownames are identical to their column names.
  • 'moduleAssigments' is a named character vector, where the names represent node labels found in the discovery dataset (e.g. 'dNet').
  • 'nPermutations' is a single number, greater than 0.
  • 'nCores' is a single number, greater than 0. Note, this number must not be larger than the number of cores on your machine, or the number of cores allocated to your job!
  • 'nullHypothesis' must be a character vector of length 1, containing either "overlap" or "all".
  • 'verbose' must be a logical vector of length 1 containing either 'TRUE' or 'FALSE'.
  • 'vCat' must be the function NetRep:::vCat.