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.
dFDRscore(fdr, fdr.threshold = NULL, scatter = F)
scores
: a vector of scores
none
# 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 2018-01-19 12:35:30 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 2018-01-19 12:35:31 100 (out of 1000) at 2018-01-19 12:35:31 200 (out of 1000) at 2018-01-19 12:35:31 300 (out of 1000) at 2018-01-19 12:35:31 400 (out of 1000) at 2018-01-19 12:35:31 500 (out of 1000) at 2018-01-19 12:35:31 600 (out of 1000) at 2018-01-19 12:35:31 700 (out of 1000) at 2018-01-19 12:35:31 800 (out of 1000) at 2018-01-19 12:35:31 900 (out of 1000) at 2018-01-19 12:35:31 1000 (out of 1000) at 2018-01-19 12:35:31 using stepup procedure... Finish at 2018-01-19 12:35:31 Runtime in total is: 1 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)