Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

any(phi >= : missing value where TRUE/FALSE needed #53

Closed
jvhagey opened this issue Jun 17, 2019 · 1 comment
Closed

any(phi >= : missing value where TRUE/FALSE needed #53

jvhagey opened this issue Jun 17, 2019 · 1 comment

Comments

@jvhagey
Copy link

jvhagey commented Jun 17, 2019

Hi @bryandmartin,

I have 4 animals that were sampled different ways on 3 different days. I want to know how the sample types differ. My data for one animal looks like this:

     AnimalID       Sample_Type    Day
1  Animal_2549             Feces  Day_7
2  Animal_2549             Feces  Day_9
3  Animal_2549             Feces Day_11
4  Animal_2549       Grab Sample  Day_7
5  Animal_2549       Grab Sample  Day_9
6  Animal_2549       Grab Sample Day_11
7  Animal_2549   Liquid Strained  Day_7
8  Animal_2549   Liquid Strained  Day_9
9  Animal_2549   Liquid Strained Day_11
10 Animal_2549 Liquid Unstrained Day_11
11 Animal_2549 Liquid Unstrained  Day_9
12 Animal_2549             Solid  Day_7
13 Animal_2549             Solid  Day_9
14 Animal_2549             Solid Day_11
15 Animal_2549      Stomach Tube  Day_9
16 Animal_2549      Stomach Tube Day_11
17 Animal_2549      Stomach Tube  Day_7

I am running the following command to look for deferentially abundant taxa in sample types while controlling for the effects of day and animal sampled.

ps51719 <- readRDS("ps_51719.rds")
set.seed(1)
fullAnalysis_060319 <- differentialTest(formula = ~ Sample_Type + AnimalID + Day, phi.formula = ~ 1,formula_null = ~ AnimalID + Day, phi.formula_null = ~ 1, test="Wald",boot=TRUE, data = ps51719, fdr_cutoff = 0.05)

This produces the following error. Although, I still got a list of significant_taxa so it seems as though it didn't stop differentialTest from running.

Error in if (is.nan(val) || any(phi <= sqrt(.Machine$double.eps)) || any(phi >=  : 
  missing value where TRUE/FALSE needed

Have you seen this error? Do I have to have something in the phi.formula is that why its giving the error? I believe the error started after I set boot=TRUE, but have't been able to track down the line that is causing the problem. Thanks for your help!

I am using the following versions:

sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS:   /afs/genomecenter.ucdavis.edu/software/R/3.6.0/lssc0-linux/lib/R/lib/libRblas.so
LAPACK: /afs/genomecenter.ucdavis.edu/software/R/3.6.0/lssc0-linux/lib/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US       LC_NUMERIC=C         LC_TIME=en_US
 [4] LC_COLLATE=en_US     LC_MONETARY=en_US    LC_MESSAGES=en_US
 [7] LC_PAPER=en_US       LC_NAME=C            LC_ADDRESS=C
[10] LC_TELEPHONE=C       LC_MEASUREMENT=en_US LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] corncob_0.1.0   phyloseq_1.24.2

loaded via a namespace (and not attached):
 [1] tidyselect_0.2.5      reshape2_1.4.3        purrr_0.3.2
 [4] splines_3.6.0         lattice_0.20-38       rhdf5_2.24.0
 [7] colorspace_1.3-2      stats4_3.6.0          enrichwith_0.2
[10] mgcv_1.8-28           survival_2.44-1.1     rlang_0.3.4
[13] pillar_1.4.0          glue_1.3.1            BiocGenerics_0.26.0
[16] bindrcpp_0.2.2        trust_0.1-7           foreach_1.4.4
[19] plyr_1.8.4            bindr_0.1.1           stringr_1.4.0
[22] zlibbioc_1.26.0       Biostrings_2.48.0     munsell_0.5.0
[25] gtable_0.3.0          VGAM_1.1-1            lpSolveAPI_5.5.2.0-17
[28] codetools_0.2-16      Biobase_2.40.0        permute_0.9-4
[31] IRanges_2.14.12       biomformat_1.8.0      parallel_3.6.0
[34] Rcpp_1.0.1            scales_1.0.0          vegan_2.5-2
[37] S4Vectors_0.18.3      jsonlite_1.6          XVector_0.20.0
[40] ggplot2_3.1.1         stringi_1.4.3         dplyr_0.7.6
[43] numDeriv_2016.8-1     grid_3.6.0            ade4_1.7-13
[46] tools_3.6.0           magrittr_1.5          lazyeval_0.2.2
[49] tibble_2.1.1          cluster_2.0.8         crayon_1.3.4
[52] ape_5.1               pkgconfig_2.0.2       MASS_7.3-51.4
[55] Matrix_1.2-17         data.table_1.11.6     assertthat_0.2.1
[58] brglm2_0.5.1          iterators_1.0.10      Rhdf5lib_1.2.1
[61] R6_2.4.0              multtest_2.36.0       nnet_7.3-12
[64] igraph_1.2.2          nlme_3.1-127          compiler_3.6.0
@bryandmartin
Copy link
Collaborator

Hi @jvhagey ,

Something appears to be happening with the initializations here. Would you try setting inits and inits_null and let me know if the problem persists?

Thanks,
Bryan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants