[BioC] [devteam-bioc] Error in calculating P-values with Genefilter function
mtmorgan at fhcrc.org
Mon Jun 3 20:22:46 CEST 2013
Not sure whether you saw this part of the response to your earlier email
This error is generated when the test in the 'if' statement is NA
> if (NA) TRUE else FALSE
Error in if (NA) TRUE else FALSE : missing value where TRUE/FALSE needed
it looks like the line of code causing the problem is from 'Anova'
m1 <- lm(x ~ cov)
m2 <- lm(x ~ 1)
av <- anova(m2, m1)
fstat <- av[["Pr(>F)"]]
if (fstat < p)
You could gain more insight by debugging this function
afilt = Anova(class7, p=0.01)
this should break into the browser (see ?browser) and allow you to step through
the function, explore variables, and figure out what is going on.
We'd need a short reproducible example to provide more insight...
On 06/03/2013 11:12 AM, Maintainer 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:
> Creating Func7P0.01 works fine, but when I run the genefilter using my data matrix and Func7P0.01 i get the following error.
> Error in if (fstat < p) return(TRUE) :
> missing value where TRUE/FALSE needed
> and when I runtraceback(), I get:
> 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.
> 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():
> R version 3.0.0 (2013-04-03)
> Platform: x86_64-apple-darwin10.8.0 (64-bit)
>  en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
> attached base packages:
>  parallel stats graphics grDevices utils datasets methods
>  base
> other attached packages:
>  pd.mogene.1.1.st.v1_3.8.0 RSQLite_0.11.3
>  DBI_0.2-6 ggplot2_0.9.3.1
>  e1071_1.6-1 class_7.3-7
>  pvac_1.8.0 pgmm_1.0
>  mclust_4.1 cluster_1.14.4
>  genefilter_1.42.0 oligoData_1.8.0
>  oligo_1.24.0 Biobase_2.20.0
>  oligoClasses_1.22.0 BiocGenerics_0.6.0
> loaded via a namespace (and not attached):
>  affxparser_1.32.0 affy_1.38.1 affyio_1.28.0
>  annotate_1.38.0 AnnotationDbi_1.22.5 BiocInstaller_1.10.1
>  Biostrings_2.28.0 bit_1.1-10 codetools_0.2-8
>  colorspace_1.2-2 dichromat_2.0-0 digest_0.6.3
>  ff_2.2-11 foreach_1.4.0 GenomicRanges_1.12.2
>  grid_3.0.0 gtable_0.1.2 IRanges_1.18.0
>  iterators_1.0.6 labeling_0.1 MASS_7.3-26
>  munsell_0.4 plyr_1.8 preprocessCore_1.22.0
>  proto_0.3-10 RColorBrewer_1.0-5 reshape2_1.2.2
>  scales_0.2.3 splines_3.0.0 stats4_3.0.0
>  stringr_0.6.2 survival_2.37-4 tools_3.0.0
>  XML_3.95-0.2 xtable_1.7-1 zlibbioc_1.6.0
> Sent via the guest posting facility at bioconductor.org.
> devteam-bioc mailing list
> To unsubscribe from this mailing list send a blank email to
> devteam-bioc-leave at lists.fhcrc.org
> You can also unsubscribe or change your personal options at
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109
Location: Arnold Building M1 B861
Phone: (206) 667-2793
More information about the Bioconductor