getFdrBins: Function to calculate the percentage of fdrs in each bin

Usage Arguments Value Examples

View source: R/fdrFunctions.R

Usage

1
getFdrBins(mat.fdr, Bins = c(0, 0.01, 0.1, 0.2, 0.3, 0.4, 0.5, 0.8, 1))

Arguments

mat.fdr

A matrix of fdr values

Bins

A numeric vector representing the bins. For n bins, there will be n+1 numbers in the vector.

Value

A numeric vector representing the percentage of each FDR bin.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#
fswaths = paste(system.file("files",package="SwathXtend"),c("Swath_result_Lib2.xlsx", "Swath_result_Lib2_3.xlsx"), sep="/")

fdr.seed = readWorkbook(fswaths[1], sheet='FDR')
fdr.ext = readWorkbook(fswaths[2], sheet='FDR')

Bins = c(0, .01, .1, .2, .3, .4, .5, .8, 1)
			
res = getFdrBins(as.matrix(fdr.ext[, -c(1:7)]), Bins)
	

SwathXtend documentation built on Nov. 8, 2020, 6:42 p.m.