dwinter / mmod

Differentiation statistics in R
Other
11 stars 5 forks source link

summarise_bootstrap(x,Gst_Hedrick) does not support missing values #9

Open shofmon88 opened 6 years ago

shofmon88 commented 6 years ago

When bs <- chao_bootstrap(decoris.final, nreps = 1000) is run, I am able to use bs.D <- summarise_bootstrap(bs, D_Jost) without any errors, but when the method is changed to Gst_Hedrick, the following error is generated:

bs.G <- summarise_bootstrap(bs, Gst_Hedrick) Error in quantile.default(B, c(0.025, 0.975)) : missing values and NaN's not allowed if 'na.rm' is FALSE

No object is saved during this process.

dwinter commented 6 years ago

Hi @shofmon88 ,

Do you have monomorphic or near-monomorphic populations for some loci in your dataset? These can be a problem when you do the resampling for confidence intervals.

I need to think about the best solution to this (will keep this issue open until that's done), but there is a branch with a temporary fix. If you install this using the command below you may be able to get a helpful answer:

devtools::install_github("dwinter/mmod", ref="bs_fix")
shofmon88 commented 6 years ago

I definitely have near-monomorphic populations. I'll give the fix a try. Thanks!

shofmon88 commented 6 years ago

After using remove.packages("mmod") and installing using the above command, I get:

Error: package or namespace load failed for ‘mmod’ in get(Info[i, 1], envir = env): lazy-load database '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/adegenet/R/adegenet.rdb' is corrupt In addition: Warning message: In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1

when I try to do library(mmod)

dwinter commented 6 years ago

well... that's something.

I wonder if you need to restart your R session before loading the devtools installed version?

shofmon88 commented 6 years ago

Good call.

This will take several hours to run, I'll come back with results.

shofmon88 commented 6 years ago

Looks like the fix worked, and the result agrees with the other results I've gotten. Thanks.

dwinter commented 6 years ago

Glad to hear it, and thanks for reporting this issue as it will force me to get this change into the CRAN version of the package!

semiramisCJ commented 5 years ago

Hi @dwinter , I had the same problem as @shofmon88 The branch with the fix worked as well. However, it may be nice to have it in the CRAN version of the package :) Thanks!

leonvarhan commented 2 years ago

Hello. @dwinter. I experienced the same issue described here, and I was wondering if a solution has been found other than installing the fix. Thank you so much!

neellab-umd commented 2 months ago

I am having the same issue. Is this going to be fixed on the CRAN installation?

Thanks for a great package that fills a critical niche!