comparison vsnp_build_tables.py @ 6:532a11cdd818 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/vsnp commit 10077c740e7cbe6a6563a1c632d711691753e46d"
author iuc
date Mon, 06 Dec 2021 18:29:21 +0000
parents a8560decb495
children 57bd5b859e86
comparison
equal deleted inserted replaced
5:a8560decb495 6:532a11cdd818
293 output_sort_table(cascade_order, mqdf, group, annotation_dict) 293 output_sort_table(cascade_order, mqdf, group, annotation_dict)
294 task_queue.task_done() 294 task_queue.task_done()
295 295
296 296
297 def set_num_cpus(num_files, processes): 297 def set_num_cpus(num_files, processes):
298 num_cpus = int(multiprocessing.cpu_count()) 298 num_cpus = len(os.sched_getaffinity(0))
299 if num_files < num_cpus and num_files < processes: 299 if num_files < num_cpus and num_files < processes:
300 return num_files 300 return num_files
301 if num_cpus < processes: 301 if num_cpus < processes:
302 half_cpus = int(num_cpus / 2) 302 half_cpus = int(num_cpus / 2)
303 if num_files < half_cpus: 303 if num_files < half_cpus: