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

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

Open
shofmon88 opened this issue Mar 26, 2018 · 10 comments
Open

Comments

@shofmon88
Copy link

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
Copy link
Owner

dwinter commented Mar 26, 2018

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
Copy link
Author

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

@shofmon88
Copy link
Author

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
Copy link
Owner

dwinter commented Mar 27, 2018

well... that's something.

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

@shofmon88
Copy link
Author

Good call.

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

@shofmon88
Copy link
Author

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

@dwinter
Copy link
Owner

dwinter commented Mar 27, 2018

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
Copy link

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
Copy link

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
Copy link

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!

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

5 participants