combineAnalyses: Combine results of multiple permutation procedures

Description Usage Arguments Details Value Examples

View source: R/multi-machine.R

Description

This function takes the output from multiple runs of modulePreservation, combines their results, and returns a new set of permutation test P-values. This is useful for parallelising calculations across multiple machines.

Usage

1
combineAnalyses(pres1, pres2)

Arguments

pres1, pres2

lists returned by modulePreservation.

Details

The calls to 'modulePreservation' must have been identical for both input lists, with the exception of the number of threads used and the number of permutations calculated.

Value

A nested list containing the same elements as modulePreservation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
data("NetRep")

# Set up input lists for each input matrix type across datasets. The list
# elements can have any names, so long as they are consistent between the
# inputs.
network_list <- list(discovery=discovery_network, test=test_network)
data_list <- list(discovery=discovery_data, test=test_data)
correlation_list <- list(discovery=discovery_correlation, test=test_correlation)
labels_list <- list(discovery=module_labels)

pres1 <- modulePreservation(
 network=network_list, data=data_list, correlation=correlation_list,
 moduleAssignments=labels_list, nPerm=1000, discovery="discovery", 
 test="test", nThreads=2
)

pres2 <- modulePreservation(
 network=network_list, data=data_list, correlation=correlation_list, 
 moduleAssignments=labels_list, nPerm=1000, discovery="discovery", 
 test="test", nThreads=2
)

combined <- combineAnalyses(pres1, pres2)

NetRep documentation built on June 12, 2018, 5:04 p.m.