nsFilter
1
0
Entering edit mode
Peevi Ijkl ▴ 170
@peevi-ijkl-4360
Last seen 9.6 years ago
Hello List I wanted to perform nonspecific filtering on my expression set. i gave the following code >f1<-function(x) IQR > 0.5) >ff<-filterfun(f1) >selected<-genefilter(data2,ff) >sum(selected) i knw this is for genefilter..but can the above be used for non specific filtering too? please help peevi [[alternative HTML version deleted]]
genefilter genefilter • 1.1k views
ADD COMMENT
0
Entering edit mode
@vincent-j-carey-jr-4
Last seen 6 weeks ago
United States
On Mon, Nov 22, 2010 at 3:57 AM, Peevi Ijkl <ipeevi at="" yahoo.com=""> wrote: > Hello List > I wanted to perform nonspecific filtering on my expression set. i gave the > following code >>f1<-function(x) IQR > 0.5) This question is not very clear, and the coding is peculiar and nonsyntactic -- there is an unmatched parenthesis in the line defining f1. As written above "IQR" names an unbound symbol in function f1. in a fresh standard R session, "IQR" is bound to a function in the stats namespace, so unless there is some globally defined vector with this name, the above code would compare a function to 0.5, probably unintended. If you want to use filtering on the actual values of the gene-specific IQR, the approach that is most consistent with the genefilter examples is IQRlb = function(lb=0.5, na.rm=TRUE) function(x) IQR(x, na.rm=na.rm)>=lb # note that IQRlb is a closure, a function returning a function IQRfiltP5 = filterfun(IQRlb(.5)) # allows flexible setting of bound and # introduction of additional tests set.seed(1234) mm = matrix(rnorm(100,0,.45),nr=10) kp = genefilter(mm, IQRfiltP5) table(kp) > table(kp) kp FALSE TRUE 6 4 This is NOT consistent with the default behavior of nsFilter, in which the distribution of the gene-specific dispersion measure is computed for all genes that are relevant in the context of the parameters of the nsFilter call, and genes are kept if their dispersion exceeds a specified quantile (by default the median) of the distribution of the dispersion measure. This is owing to the default setting of "filterByQuantile" in nsFilter. to emulate this aspect of nsFilter in a very simple way, you could do the following medIQR = median(apply(mm,1,IQR)) kp = apply(mm,1,function(x)IQR(x)>=medIQR) but note that nsFilter accepts and returns an ExpressionSet as representation of the data. Furthermore, computation of IQR in nsFilter is performed by mechanisms other than stats::IQR. The numerical definition of quantiles can be intricate. >>ff<-filterfun(f1) >>selected<-genefilter(data2,ff) >>sum(selected) > ?i knw this is for genefilter..but can the above be used for non specific > filtering too? > > please help > > peevi > > > > > ? ? ? ?[[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD COMMENT

Login before adding your answer.

Traffic: 651 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6