-
Notifications
You must be signed in to change notification settings - Fork 92
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
Dromel qc #1668
Dromel qc #1668
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1668 +/- ##
=======================================
Coverage 99.84% 99.85%
=======================================
Files 136 136
Lines 4656 4671 +15
Branches 470 470
=======================================
+ Hits 4649 4664 +15
Misses 3 3
Partials 4 4 ☔ View full report in Codecov by Sentry. |
Looking at the "details" on the failing tests (above), there's one failing test:
You can run (only) this test locally by doing
|
I get an error locally, I think it is a factor of two thing: In my code, I use a -2 multiplier for the
And in the original code for the DFE the mean is unscaled (though otherwise numerically the same):
I'm not sure which is more correct based on the paper! |
Hm, why aren't you sure? If they're using dadi, there should be a factor of 2 (as you say); is it not clear that the parameters are from dadi? (I'm not looking at Text S2 right now; you could paste in a screenshot of the paragraph in question?) |
Ah, I see - they used dadi to fit the demographic model, but then they "infer the DFE from the nonsynonymous SFS". Looks like we need to have a look in that Appendix (and, hopefully not the code). |
So - could you fix up the original implementation with this factor of two as well? (And, the way you've coded it is better: writing down explicitly the shape/scale values that are in the paper and multiplying them to get the mean.) Then this should pass! |
lol - I just took the same screenshot! I'll fix the implementation in the catalog as well :) |
Co-authored-by: Peter Ralph <[email protected]>
hah I was faster =) |
Yay! Have a look at my suggestion; looks like we can merge once you accept that (or not?). |
Co-authored-by: Peter Ralph <[email protected]>
Addresses #1054
I used the gamma distribution parameters from the full model (no singletons, recent mutation rate estimates) in table S2 and calculated the proportions of neutral and gamma from Peter's comment:
Originally posted by @petrelharp in #1054