Last data update: 2014.03.03

R: Assessment of the significance of intensity-dependent bias
fdr.intR Documentation

Assessment of the significance of intensity-dependent bias

Description

This function assesses the significance of intensity-dependent bias by an one-sided random permutation test. The observed average values of logged fold-changes within an intensity neighbourhood are compared to an empirical distribution generated by random permutation. The significance is given by the false discovery rate.

Usage

fdr.int(A,M,delta=50,N=100,av="median")

Arguments

A

vector of average logged spot intensity

M

vector of logged fold changes

delta

integer determining the size of the neighbourhood. The actual window size is (2 * delta+1).

N

number of random permutations performed for generation of empirical distribution

av

averaging of M within neighbourhood by mean or median (default)

Details

The function fdr.int assesses significance of intensity-dependent bias using a one-sided random permutation test. The null hypothesis states the independence of A and M. To test if M depends on A, spots are ordered with respect to A. This defines a neighbourhood of spots with similar A for each spot. Next, a test statistic is defined by calculating the median or mean of M within a symmetrical spot's intensity neighbourhood of chosen size (2 *delta+1). An empirical distribution of the test statistic is produced by calculating for N random intensity orders of spots. Comparing this empirical distribution of median/mean of code{M} with the observed distribution of median/mean of code{M}, the independence of M and A is assessed. If M is independent of A, the empirical distribution of median/mean of code{M} can be expected to be distributed around its mean value. The false discovery rate (FDR) is used to assess the significance of observing positive deviations of median/mean of code{M}. It indicates the expected proportion of false positives among rejected null hypotheses. It is defined as FDR=q*T/s, where q is the fraction of median/mean of code{M} larger than chosen threshold c for the empirical distribution, s is the number of neighbourhoods with (median/mean of code{M})> c for the distribution derived from the original data and T is the total number of neighbourhoods in the original data. Varying threshold c determines the FDR for each spot neighbourhood. FDRs equal zero are set to FDR=1/T*N for computational reasons, as log10(FDR) is plotted by sigint.plot. Correspondingly, the significance of observing negative deviations of median/mean of code{M} can be determined. If the neighbourhood window extends over the limits of the intensity scale, the significance is set to NA.

Value

A list of vector containing the false discovery rates for positive (FDRp) and negative (FDRn) deviations of median/mean of code{M} (of the spot's neighbourhood) is produced.

Note

The same functionality but with our input and output formats is offered by fdr.int

Author(s)

Matthias E. Futschik (http://itb.biologie.hu-berlin.de/~futschik)

See Also

fdr.int2,p.int, fdr.spatial, sigint.plot

Examples


# To run these examples, delete the comment signs (#) in front of the commands.
#
# LOADING DATA NOT-NORMALISED
# data(sw)
# CALCULATION OF SIGNIFICANCE OF SPOT NEIGHBOURHOODS
# For this example, N was chosen rather small. For "real" analysis, it should be larger.
# FDR <- fdr.int(maA(sw)[,1],maM(sw)[,1],delta=50,N=10,av="median")
# VISUALISATION OF RESULTS
# sigint.plot(maA(sw)[,1],maM(sw)[,1],FDR$FDRp,FDR$FDRn,c(-5,-5))

# LOADING NORMALISED DATA
# data(sw.olin)
# CALCULATION OF SIGNIFICANCE OF SPOT NEIGHBOURHOODS 
# FDR <- fdr.int(maA(sw.olin)[,1],maM(sw.olin)[,1],delta=50,N=10,av="median")
# VISUALISATION OF RESULTS
# sigint.plot(maA(sw.olin)[,1],maM(sw.olin)[,1],FDR$FDRp,FDR$FDRn,c(-5,-5))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(OLIN)
Loading required package: locfit
locfit 1.5-9.1 	 2013-03-22
Loading required package: marray
Loading required package: limma
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/OLIN/fdr.int.Rd_%03d_medium.png", width=480, height=480)
> ### Name: fdr.int
> ### Title: Assessment of the significance of intensity-dependent bias
> ### Aliases: fdr.int
> ### Keywords: nonparametric univar htest
> 
> ### ** Examples
> 
> 
> # To run these examples, delete the comment signs (#) in front of the commands.
> #
> # LOADING DATA NOT-NORMALISED
> # data(sw)
> # CALCULATION OF SIGNIFICANCE OF SPOT NEIGHBOURHOODS
> # For this example, N was chosen rather small. For "real" analysis, it should be larger.
> # FDR <- fdr.int(maA(sw)[,1],maM(sw)[,1],delta=50,N=10,av="median")
> # VISUALISATION OF RESULTS
> # sigint.plot(maA(sw)[,1],maM(sw)[,1],FDR$FDRp,FDR$FDRn,c(-5,-5))
> 
> # LOADING NORMALISED DATA
> # data(sw.olin)
> # CALCULATION OF SIGNIFICANCE OF SPOT NEIGHBOURHOODS 
> # FDR <- fdr.int(maA(sw.olin)[,1],maM(sw.olin)[,1],delta=50,N=10,av="median")
> # VISUALISATION OF RESULTS
> # sigint.plot(maA(sw.olin)[,1],maM(sw.olin)[,1],FDR$FDRp,FDR$FDRn,c(-5,-5))
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>