FDR.permutation: Performs parallel permuted runs of 'R2GUESS' and returns the...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/FDR.permutation.R

Description

FDR.permutation will first run GUESS in parallel (over CPUs) for several permutations of the Y matrix mimicking the null hypothesis of no association. Results from the permutation procedure will subsequently be used to derive the cut-off values for the Marginal Posterior Probability of Inclusion (MPPI) ensuring an empirical FDR control at a user-defined level. Several cut-off values will be investigated and, for each, the corresponding empirical FDR will be returned. The cut-off value providing the closest FDR estimate to the desired level will be retained. Exact match to the desired level will be achieved by linear interpolation. The latter is based on the same calculation as in Analysis.permutation.

Usage

1
2
  FDR.permutation(x,path.input = NULL, Npermut, start.counter=1,
     path.output = NULL, threshold = 0.05, nbcpu = NULL, number.cutoff=200)

Arguments

x

an object of class ESS.

path.input

path to the directory containing the permuted re-samples of the Y matrix. By default (=NULL), the permuted outcomes are stored in the same directory as the results from the original R2GUESS run (path.input).

path.output

path to the directory in which results from permuted data are stored. By default (=NULL), these are saved in the directory where results from the original GUESS run were stored (path.output).

Npermut

number of permutations to run.

start.counter

defines the integer from which to start labelling permutation runs.

threshold

numeric value specifying the desired FDR level.

nbcpu

integer indicating the number of CPUs to use for the permutation procedure. This number has to be lower than the number of cores available on the platform. By default (=NULL), the function uses a single core.

number.cutoff

numeric value specifying the number of points on which to base the FDR estimation.

Value

FDR.permutation generates permutation re-samples from the original Y matrix and generates for each permutation standard R2GUESS output files. Sets of results can be separately analysed using Analysis.permutation. The function also returns a list containing the following fields:

cutoff.MPI

the MPPI threshold to control empirical FDR at a specified level.

cutoff_int

the linearly interpolated (across the number.cutoff points) cut-off value of MPPI exactly controlling the FDR at the specified level.

cutoff_St

the vector of cut-off values investigated (containing number.cutoff elements).

FDR_emp

empirical FDR corresponding to the cutoff.MPI value.

FDR_emp_int

empirical FDR value estimated by linear interpolation for the cutoff_int value.

FDR_emp_St

a vector of empirical FDR values computed by linear interpolation for each cutoff_St values investigated.

Author(s)

Benoit Liquet b.liquet@uq.edu.au,
Marc Chadeau-Hyam m.chadeau@imperial.ac.uk,
Leonardo Bottolo l.bottolo@imperial.ac.uk,
Gianluca Campanella g.campanella11@imperial.ac.uk

See Also

Analysis.permutation

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
modelY_Hopx <- example.as.ESS.object()
path.output.perm <- tempdir()
path.input.perm <-path.output.perm

cutoff <- FDR.permutation(x=modelY_Hopx,Npermut=100,start.counter=1,
           path.output=path.output.perm,path.input=path.input.perm,nbcpu=3)
 
## End(Not run) 

R2GUESS documentation built on May 2, 2019, 1:47 p.m.