-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Optional disabling of statistics in poppr table #248
Comments
That's.... odd. This function shouldn't be erroring on negative values of IA. Can you include a copy of this error?
I might be able to implement that. The FWIW, You can get most of the way to the table with the If all you need are MLG stats, then |
I don't have a reprex for the data that caused the error, but this is the error I'm getting. I've gotten negative ia results before and poppr reported them, I'm guessing this is maybe a combination of large data (>=130 individuals w/40k snps) and very high clonality? Negative length vector is a weird error and my google-fu didn't get me very far. I kind of was just thinking this was due to my very highly clonal data.
Thanks, this is helpful! Clonality stats are good. I do want |
This is definitely a bug and I'm not sure where it's coming from. Would you be willing to send me a copy of your data so I could check it out? |
Hi @zkamvar , sorry I ghosted you. I was tracking down other potential issues in my data to make sure it was not a bug upstream and I feel much more confident in my data now. I'm e-mailing you at the address in your bio. |
I realize I responded via email and not on GitHub. This is happening because there are too many loci being fed into the index of association function. It needs to construct a vector of n(n-1)/2 (where n is the number of loci) to calculate the denominator and the number of loci presented is just too large. The recommended alternative is to convert your source data to Details for nerdsThe reason this is happening is because there is an integer overflow in the construction of the covariance matrix (the count variable on line 111): Lines 95 to 116 in 94c745a
I can avoid this by specifying a long int (or whatever solution I came up with to solve #234), adding a warning about too many loci, and adding a meaningful error when the counter overflows. |
Ah, that totally makes sense. It worked for ~22k loci but crashed at ~56k loci, but I recognize that even ~22k loci is a lot to use. I'll definitely subset my data. Thanks for digging into the weeds to figure out what's going on. I must be a huge nerd, 234 and #235 were interesting! |
Please place an "x" in all the boxes that apply
Would it be possible to enable or disable some of the diversity statistics calculated in the poppr table? In a population I'm analyzing, .ia is getting an error because of negative values. It's already been shown that this population is very highly clonal, but I am interested in the other diversity indices aside from index of association. A workaround I see for this is to just not run the index of association, maybe this looks like a parameter that takes a character vector of 'calculations to run' and by default it just runs all of them?
The text was updated successfully, but these errors were encountered: