genefilter (nsFilter function)
2
0
Entering edit mode
Anne ▴ 60
@anne-2777
Last seen 10.3 years ago
Hi, A question about gene filtering: I was wondering if anyone could explain me how I should interpret the code below. I am not sure I understand what it means that IQR(x) > 2.5. iqr <- function(x) IQR(x) > 2.5 filter <- nsFilter(eset, var.filter=TRUE, var.func = iqr, var.cutoff = 0.5) regards Anne [[alternative HTML version deleted]]
• 2.1k views
ADD COMMENT
0
Entering edit mode
rgentleman ★ 5.5k
@rgentleman-7725
Last seen 9.7 years ago
United States
Hi Anne, Perhaps you could tell us the context in which this arose? Anne wrote: > Hi, > > A question about gene filtering: > > I was wondering if anyone could explain me how I should interpret the code > below. > I am not sure I understand what it means that IQR(x) > 2.5. > > iqr <- function(x) IQR(x) > 2.5 > filter <- nsFilter(eset, var.filter=TRUE, var.func = iqr, var.cutoff = 0.5) > The short answer is that for some input, x, the function iqr will return TRUE of FALSE depending on whether the IQR is larger than 2.5 or smaller than 2.5 (you could have just tried this). > iqr(runif(10)) [1] FALSE Somewhat troubling is the use of this function in the call to nsFilter since the documentation for nsFilter says: var.func: A 'function' that will be used to assess the variance of a probe set across all samples. This function should return a numeric vector of length one when given a numeric vector as input. Probe sets with a 'var.func' value less than 'var.cutoff' will be removed. The default is 'IQR'. and hence the function supplied is not of the correct form, it is unlikely to raise an error (as there are no simple ways to check whether a function returns the right kind of value, and logicals can always be coerced to numeric), but I don't see an easy way to anticipate what nsFilter will do in this setting. I think you, or whoever wrote this, would do a bit better to look at the arguments to the function and use them somewhat more appropriately (eg, if you set var.cutoff = 2.5 and filterByQuantile=FALSE, and do not specify a var.func value, I think you get what is intended). best wishes Robert > > > regards > Anne > > [[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 > -- Robert Gentleman, PhD Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M2-B876 PO Box 19024 Seattle, Washington 98109-1024 206-667-7700 rgentlem at fhcrc.org
ADD COMMENT
0
Entering edit mode
Hi Robert, -----Oprindelig meddelelse----- Fra: Robert Gentleman [mailto:rgentlem at fhcrc.org] Sendt: 19. juni 2008 13:46 Til: Anne Cc: bioconductor at stat.math.ethz.ch Emne: Re: [BioC] genefilter (nsFilter function) Hi Anne, Perhaps you could tell us the context in which this arose? Thanks for your answer. The code below was used to filter out genes before doing an unsupervised cluster analysis. regards Anne Anne wrote: > Hi, > > A question about gene filtering: > > I was wondering if anyone could explain me how I should interpret the > code below. > I am not sure I understand what it means that IQR(x) > 2.5. > > iqr <- function(x) IQR(x) > 2.5 > filter <- nsFilter(eset, var.filter=TRUE, var.func = iqr, var.cutoff = > 0.5) > The short answer is that for some input, x, the function iqr will return TRUE of FALSE depending on whether the IQR is larger than 2.5 or smaller than 2.5 (you could have just tried this). > iqr(runif(10)) [1] FALSE Somewhat troubling is the use of this function in the call to nsFilter since the documentation for nsFilter says: var.func: A 'function' that will be used to assess the variance of a probe set across all samples. This function should return a numeric vector of length one when given a numeric vector as input. Probe sets with a 'var.func' value less than 'var.cutoff' will be removed. The default is 'IQR'. and hence the function supplied is not of the correct form, it is unlikely to raise an error (as there are no simple ways to check whether a function returns the right kind of value, and logicals can always be coerced to numeric), but I don't see an easy way to anticipate what nsFilter will do in this setting. I think you, or whoever wrote this, would do a bit better to look at the arguments to the function and use them somewhat more appropriately (eg, if you set var.cutoff = 2.5 and filterByQuantile=FALSE, and do not specify a var.func value, I think you get what is intended). best wishes Robert > > > regards > Anne > > [[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 > -- Robert Gentleman, PhD Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M2-B876 PO Box 19024 Seattle, Washington 98109-1024 206-667-7700 rgentlem at fhcrc.org
ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 6 days ago
United States
Hi Anne, Anne wrote: > Hi, > > A question about gene filtering: > > I was wondering if anyone could explain me how I should interpret the code > below. > I am not sure I understand what it means that IQR(x) > 2.5. > The IQR is the inter-quartile range, which is the difference between the 75th and 25th percentile of your data. It is a more robust measure of the range of the data, as it will not be affected by a small number of extreme values (unlike, say the variance). Best, Jim > > iqr <- function(x) IQR(x) > 2.5 > filter <- nsFilter(eset, var.filter=TRUE, var.func = iqr, var.cutoff = 0.5) > > > > regards > Anne > > [[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
0
Entering edit mode
> >The IQR is the inter-quartile range, which is the difference between >the 75th and 25th percentile of your data. It is a more robust >measure of the range of the data, as it will not be affected by a >small number of extreme values (unlike, say the variance). I've always been a little suspicious of filtering on IQR or other measures of variance, and I just came upon a case where filtering on IQR could exclude some genes of interest. I have a 2 trt x 4 time point experiment, and the control treatment is not expected to change over time. Any genes that only change at only 1 or 2 time points in the infected treatment could show a low IQR and be filtered out. So be careful of your filtering criteria when you have a complex experimental design! Cheers, Jenny >Best, > >Jim > > >> >>iqr <- function(x) IQR(x) > 2.5 >>filter <- nsFilter(eset, var.filter=TRUE, var.func = iqr, >>var.cutoff = 0.5) regards >>Anne >> >> [[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 > >_______________________________________________ >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 Jenny Drnevich, Ph.D. Functional Genomics Bioinformatics Specialist W.M. Keck Center for Comparative and Functional Genomics Roy J. Carver Biotechnology Center University of Illinois, Urbana-Champaign 330 ERML 1201 W. Gregory Dr. Urbana, IL 61801 USA ph: 217-244-7355 fax: 217-265-5066 e-mail: drnevich at illinois.edu
ADD REPLY

Login before adding your answer.

Traffic: 398 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