fdr.spatial {OLIN} | R Documentation |

This function assesses the significance of spatial bias by a one-sided random permutation test. This is achieved by comparing the observed average values of logged fold-changes within a spot's spatial neighbourhood with an empirical distribution generated by random permutation. The significance of spatial bias is given by the false discovery rate.

fdr.spatial(X,delta=2,N=100,av="median",edgeNA=FALSE)

`X` |
matrix of logged fold changes |

`delta` |
integer determining the size of spot neighbourhoods
(`(2*delta+1)x(2*delta+1)` ). |

`N` |
number of random permutations performed for generation of empirical background distribution |

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

`edgeNA` |
treatment of edges of array: For `edgeNA=TRUE` ,
the significance of a neighbourhood (defined by a sliding window) is set to NA,
if the neighbourhood extends over the edges of the matrix. |

The function `fdr.spatial`

assesses the significance of spatial bias using a one-sided random permutation test.
The null hypothesis states random spotting i.e. the independence of log ratio `M`

and spot location. First, a neighbourhood of a spot is defined by a two dimensional square window
of chosen size ((2*delta+1)x(2*delta+1)). Next, a test statistic is defined by calculating
the *median* or *mean* of `M`

(*bar{M}*) within
a symmetrical spot's neighbourhood. An empirical distribution of *median/mean of M* is generated
based

`N`

random permutations of the spot locations on the array. The randomisation and calculation of
`M`

`N`

times.
Comparing this empirical distribution of `M`

`M`

`M`

and spot location
can be assessed. If `M`

is independent of spot's location,
the empirical distribution can be expected to be
distributed around its mean value. To assess the significance of observing positive deviations of
`M`

`M`

`s`

is the number of neighbourhoods with
`M`

)> c`T`

is the total number of neighbourhoods on the array. FDRs equal zero are set to
`M`

A list of vectors containing the false discovery rates for positive (`FDRp`

)
and negative (`FDRn`

) deviations of
*median/mean of M* of the spot's neighbourhood is produced.

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

`p.spatial`

, `fdr.int`

, `sigxy.plot`

# To run these examples, "un-comment" them! # # LOADING DATA # data(sw) # M <- v2m(maM(sw)[,1],Ngc=maNgc(sw),Ngr=maNgr(sw), # Nsc=maNsc(sw),Nsr=maNsr(sw),main="MXY plot of SW-array 1") # # CALCULATION OF SIGNIFICANCE OF SPOT NEIGHBOURHOODS # For this illustration, N was chosen rather small. For "real" analysis, it should be larger. # FDR <- fdr.spatial(M,delta=2,N=10,av="median",edgeNA=TRUE) # sigxy.plot(FDR$FDRp,FDR$FDRn,color.lim=c(-5,5),main="FDR") # # LOADING NORMALISED DATA # data(sw.olin) # M<- v2m(maM(sw.olin)[,1],Ngc=maNgc(sw.olin),Ngr=maNgr(sw.olin), # Nsc=maNsc(sw.olin),Nsr=maNsr(sw.olin),main="MXY plot of SW-array 1") # # CALCULATION OF SIGNIFICANCE OF SPOT NEIGHBOURHOODS # FDR <- fdr.spatial(M,delta=2,N=10,av="median",edgeNA=TRUE) # VISUALISATION OF RESULTS # sigxy.plot(FDR$FDRp,FDR$FDRn,color.lim=c(-5,5),main="FDR")

[Package *OLIN* version 1.3.2 Index]