Function to transform fdr into scores according to log-likelihood ratio between the true positives and the false positivies and/or after controlling false discovery rate

Description

dFDRscore is supposed to take as input a vector of fdr, which are transformed into scores according to log-likelihood ratio between the true positives and the false positivies. Also if the FDR threshold is given, it is used to make sure that fdr below threshold are considered significant and thus scored positively. Instead, those fdr above the given threshold are considered insigificant and thus scored negatively.

Usage

dFDRscore(fdr, fdr.threshold = NULL, scatter = F)

Arguments

fdr
a vector containing a list of input fdr
fdr.threshold
the given FDR threshold. By default, it is set to NULL, meaning there is no constraint. If given, those fdr with the FDR below threshold are considered significant and thus scored positively. Instead, those fdr with the FDR above given threshold are considered insigificant and thus scored negatively
scatter
logical to indicate whether the scatter graph of scores against p-values should be drawn. Also indicated is the score corresponding to the given FDR threshold (if any)

Value

  • scores: a vector of scores

Note

none

Examples

# 1) generate data with an iid matrix of 1000 x 9 data <- cbind(matrix(rnorm(1000*3,mean=0,sd=1), nrow=1000, ncol=3), matrix(rnorm(1000*3,mean=0.5,sd=1), nrow=1000, ncol=3), matrix(rnorm(1000*3,mean=-0.5,sd=1), nrow=1000, ncol=3)) # 2) calculate the significance according to SVD # using "fdr" significance fdr <- dSVDsignif(data, signif="fdr", num.permutation=10)
Start at 2017-03-27 19:55:18 First, singular value decomposition of the input matrix (with 1000 rows and 9 columns)... Second, determinate the eigens... via automatically deciding on the number of dominant eigens under the cutoff of 1.00e-02 pvalue number of the eigens in consideration: 1 Third, construct the gene-specific projection vector,and calculate distance statistics... Finally, obtain gene significance (fdr) based on 10 permutations... doing row-wise permutations... estimating fdr... 1 (out of 1000) at 2017-03-27 19:55:20 100 (out of 1000) at 2017-03-27 19:55:20 200 (out of 1000) at 2017-03-27 19:55:20 300 (out of 1000) at 2017-03-27 19:55:20 400 (out of 1000) at 2017-03-27 19:55:20 500 (out of 1000) at 2017-03-27 19:55:20 600 (out of 1000) at 2017-03-27 19:55:20 700 (out of 1000) at 2017-03-27 19:55:20 800 (out of 1000) at 2017-03-27 19:55:20 900 (out of 1000) at 2017-03-27 19:55:20 1000 (out of 1000) at 2017-03-27 19:55:20 using stepup procedure... Finish at 2017-03-27 19:55:20 Runtime in total is: 2 secs
# 3) calculate the scores according to the fitted BUM and fdr=0.01 # no fdr threshold scores <- dFDRscore(fdr) # using fdr threshold of 0.01 scores <- dFDRscore(fdr, fdr.threshold=0.1, scatter=TRUE)

Source code

dFDRscore.r

Source man

dFDRscore.Rd dFDRscore.pdf

See also

dSVDsignif, dNetPipeline