Mercurial > repos > iuc > vsnp_determine_ref_from_data
comparison vsnp_get_snps.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 |
---|---|
20 def get_time_stamp(): | 20 def get_time_stamp(): |
21 return datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H-%M-%S') | 21 return datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H-%M-%S') |
22 | 22 |
23 | 23 |
24 def set_num_cpus(num_files, processes): | 24 def set_num_cpus(num_files, processes): |
25 num_cpus = int(multiprocessing.cpu_count()) | 25 num_cpus = len(os.sched_getaffinity(0)) |
26 if num_files < num_cpus and num_files < processes: | 26 if num_files < num_cpus and num_files < processes: |
27 return num_files | 27 return num_files |
28 if num_cpus < processes: | 28 if num_cpus < processes: |
29 half_cpus = int(num_cpus / 2) | 29 half_cpus = int(num_cpus / 2) |
30 if num_files < half_cpus: | 30 if num_files < half_cpus: |