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

rarefaction in private_alleles function #195

Open afontcub opened 5 years ago

afontcub commented 5 years ago

Hi! I am calculating the number of private alleles with rarefaction, using a loop to resample my populations to a standard sample size and then apply the private_alleles function. But, it would be amazing if you could implement a rarefaction correction inside the private_alleles function! For example, with the unbiased estimator proposed by Kalinowski (Kalinowski, 2004. Conservation Genetics.)

Thank you very much in advance!

Amaranta.

zkamvar commented 5 years ago

Thanks for the suggestion. I also think this would be a good thing to implement, however, my capacity for adding new functionality to poppr is a bit limited at the time. I may have some time to take a look at this in February or March. I'm assuming that the paper you are referring to is: http://www.montana.edu/kalinowski/documents/2004_Rarefaction_ConservationGenetics.pdf

In the meantime, one thing that would help with this would be a small test data set that would produce a known value with this method. Also, if you are comfortable using git and github, and have this solution already coded using poppr, feel free to create a pull request and I'll review it :)

Feel free to ping me again if there's no activity for a while.

zoemeziere commented 7 months ago

Hi! I am also using the private_alleles function and find large discrepancies between populations due to sample sizes differences. Do you have any hint on how to implement rarefaction to the function to account for that? Cheers!