grunwaldlab / poppr

🌶 An R package for genetic analysis of populations with mixed (clonal/sexual) reproduction
https://grunwaldlab.github.io/poppr
68 stars 26 forks source link

Fix inefficient implementation of boot.bruvo #226

Open StaffanBetner opened 4 years ago

StaffanBetner commented 4 years ago

Please place an "x" in all the boxes that apply


I have found that boot.bruvo is very inefficiently implemented. It would be a better approach to store the distance matrices per locus, and sample them with replacement, and then calculate trees, instead of recalculating the distance matrices for every iteration.


zkamvar commented 4 years ago

Would you be willing to submit a PR for this?

StaffanBetner commented 4 years ago

I only have some very ugly code that remedies this problem, but I will at least look into it. I suspect there are other speed improvments as well that can be done.

zkamvar commented 4 years ago

Thank you. For the record, with the advent of {styler}, ugly code is not much of a problem. For contributions, I require that they are formally tested.