R: A filter to select genes based on there being a gap.
gapFilter
R Documentation
A filter to select genes based on there being a gap.
Description
The gapFilter looks for genes that might usefully discriminate
between two groups (possibly unknown at the time of filtering).
To do this we look for a gap in the ordered expression values. The gap
must come in the central portion (we exclude jumps in the initial
Prop values or the final Prop values).
Alternatively, if the IQR for the gene is large that will also pass
our test and the gene will be selected.
The proportion (or number) of samples to exclude at either
end.
na.rm
If TRUE then NA's will be removed before
processing.
neg.rm
If TRUE then negative values in x will be
removed before processing.
Details
As stated above we are interested in
Value
A function that returns either TRUE or FALSE depending on
whether the vector supplied has a gap larger than Gap or an IQR
(inter quartile range) larger than IQR. For computing the gap we
want to exclude a proportion, Prop from either end of the sorted
values. The reason for this requirement is that genes which differ in
expression levels only for a few samples are not likely to be interesting.
Author(s)
R. Gentleman
See Also
ttest, genefilter
Examples
set.seed(256)
x <- c(rnorm(10,100,3), rnorm(10, 100, 10))
y <- x + c(rep(0,10), rep(100,10))
tmp <- rbind(x,y)
Gfilter <- gapFilter(200, 100, 5)
ffun <- filterfun(Gfilter)
genefilter(tmp, ffun)
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(genefilter)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/genefilter/gapFilter.Rd_%03d_medium.png", width=480, height=480)
> ### Name: gapFilter
> ### Title: A filter to select genes based on there being a gap.
> ### Aliases: gapFilter
> ### Keywords: manip
>
> ### ** Examples
>
> set.seed(256)
> x <- c(rnorm(10,100,3), rnorm(10, 100, 10))
> y <- x + c(rep(0,10), rep(100,10))
> tmp <- rbind(x,y)
> Gfilter <- gapFilter(200, 100, 5)
> ffun <- filterfun(Gfilter)
> genefilter(tmp, ffun)
x y
FALSE TRUE
>
>
>
>
>
> dev.off()
null device
1
>