bcm-uga / Loter

A software package for local ancestry inference and haplotype phasing
Other
38 stars 7 forks source link

Local ancestry multiple processors. #1

Closed francescomontinaro closed 5 years ago

francescomontinaro commented 6 years ago

Hi, Thank you for this excelent tool! Is there any way to use multiple processors for the local ancestry estimation?

Best,

Francesco

mblumuga commented 6 years ago

If you compile the soft without openmp (mac users), it is not possible to use multiple processors. If you compile soft with openmp, the software uses 20 threads by default. This should be a parameter of the method in the future.

gdurif commented 5 years ago

Hi, it is now possible to select the number of cpu cores that you want to use with the argument num_threads, e.g.

import loter.locanc.local_ancestry as lc
res_loter = lc.loter_smooth([H_ceu[2:], H_yri[2:]], H_met, num_threads=8)

See commit 675fecd