[BioC] Error in calculating P-values with Genefilter function

James W. MacDonald jmacdon at uw.edu
Mon Jun 3 20:27:19 CEST 2013


Hi Brad,

On 6/3/2013 2:12 PM, Brad Cattrysse [guest] wrote:
> To whom it may concern,
>
> I am having trouble with the genefilter function in R. I am attempting to extract genes from 7 arrays using a p-value of 0.01 using the following code:
>
> Func7P0.01<-filterfun(Anova(class7,p=0.01))
> Func7P0.01
> Anova7_P0.01<-genefilter(SCDexprs7,Func7P0.01)
> Anova7_P0.01
>
> Creating Func7P0.01 works fine, but when I run the genefilter using my data matrix and Func7P0.01 i get the following error.
>
>
>> Anova7_P0.01<-genefilter(SCDexprs7,Func7P0.01)
> Error in if (fstat<  p) return(TRUE) :
>    missing value where TRUE/FALSE needed
>
>
> and when I runtraceback(), I get:
>
>> traceback()
> 4: fun(x)
> 3: FUN(newX[, i], ...)
> 2: apply(expr, 1, flist)
> 1: genefilter(SCDexprs7, Func7P0.01)
>
>
> Im not entirely sure what is going on, but when I extract genes from the same 7 arrays, plus another array (8 arrays total) using the same code structure (below) it works fine.

My best guess would be that you have some missing data for a particular 
gene, and when you only have seven arrays you get to a point where you 
don't have enough data of one type to fit a linear model, so the code here

        m1 <- lm(x ~ cov)
         m2 <- lm(x ~ 1)
         av <- anova(m2, m1)

from Anova() breaks.

Try doing

options(error = recover)

and then run genefilter. You will error out at the point where things 
are breaking, and can look at the variables being analyzed at that point 
to see what the problem is.

Best,

Jim



>
>
> Func8P0.01<-filterfun(Anova(class8,p=0.01))
> Func8P0.01
> Anova8_P0.01<-genefilter(SCDexprs8,Func8P0.01)
> Anova8_P0.01
>
>
> Any help with this matter would be greatly appreciated as I am not sure what else to try.
>
> Thanks in advance!
> Brad Cattrysse
>
>
>   -- output of sessionInfo():
>
>> sessionInfo()
> R version 3.0.0 (2013-04-03)
> Platform: x86_64-apple-darwin10.8.0 (64-bit)
>
> locale:
> [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
>
> attached base packages:
> [1] parallel  stats     graphics  grDevices utils     datasets  methods
> [8] base
>
> other attached packages:
>   [1] pd.mogene.1.1.st.v1_3.8.0 RSQLite_0.11.3
>   [3] DBI_0.2-6                 ggplot2_0.9.3.1
>   [5] e1071_1.6-1               class_7.3-7
>   [7] pvac_1.8.0                pgmm_1.0
>   [9] mclust_4.1                cluster_1.14.4
> [11] genefilter_1.42.0         oligoData_1.8.0
> [13] oligo_1.24.0              Biobase_2.20.0
> [15] oligoClasses_1.22.0       BiocGenerics_0.6.0
>
> loaded via a namespace (and not attached):
>   [1] affxparser_1.32.0     affy_1.38.1           affyio_1.28.0
>   [4] annotate_1.38.0       AnnotationDbi_1.22.5  BiocInstaller_1.10.1
>   [7] Biostrings_2.28.0     bit_1.1-10            codetools_0.2-8
> [10] colorspace_1.2-2      dichromat_2.0-0       digest_0.6.3
> [13] ff_2.2-11             foreach_1.4.0         GenomicRanges_1.12.2
> [16] grid_3.0.0            gtable_0.1.2          IRanges_1.18.0
> [19] iterators_1.0.6       labeling_0.1          MASS_7.3-26
> [22] munsell_0.4           plyr_1.8              preprocessCore_1.22.0
> [25] proto_0.3-10          RColorBrewer_1.0-5    reshape2_1.2.2
> [28] scales_0.2.3          splines_3.0.0         stats4_3.0.0
> [31] stringr_0.6.2         survival_2.37-4       tools_3.0.0
> [34] XML_3.95-0.2          xtable_1.7-1          zlibbioc_1.6.0
> --
> Sent via the guest posting facility at bioconductor.org.
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099



More information about the Bioconductor mailing list