jgx65 / hierfstat

the hierfstat package
24 stars 14 forks source link

Parallelizing genet.dist() ? #53

Closed alexkrohn closed 2 years ago

alexkrohn commented 2 years ago

Hi there! I'm loving hierfstat and am using it quite often. While most of the functions work quite quickly, computing time for genet.dist() increases non-linearly with number of populations and SNPs. I was wondering if there was any way to parallelize the calculations to take advantage of multi-core machines, or other ways one might speed up the calculations?

Thanks for your help!

jgx65 commented 2 years ago

With many markers (>1000), classical hierfstat functions will be very slow. Consider using dosage related functions, you can move the hierfstat format to dosage via biall2dos or fstat2dos (also, have a look at the vignettes)

alexkrohn commented 2 years ago

Thanks! Will do.