-
Notifications
You must be signed in to change notification settings - Fork 98
/
Copy pathtool_defaults.yml
56 lines (53 loc) · 2.17 KB
/
tool_defaults.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
# ALL tags must be with dashes (-) instead of underscores (_)
global:
default_inherits: default
tools:
default:
cores: 1
mem: cores * 3.8
gpus: 0
env:
GALAXY_MEMORY_MB: "{int(mem * 1024)}" # set 5/2023 might be moved to runner or tool wrappers, related to Galaxy issue 15952
params:
metadata_strategy: 'extended'
tmp_dir: true
request_cpus: "{cores}"
request_memory: "{mem}G"
submit_request_gpus: "{gpus or 0}"
docker_memory: "{mem}G"
description: "{tool.id if not tool.id.count('/') == 5 else tool.id.split('/')[4]}"
scheduling:
reject:
- offline
rules:
- if: user is not None
execute: |
training_roles = [r.name for r in user.all_roles() if not r.deleted and "training" in r.name]
training_expr = " || ".join(['(GalaxyGroup == "%s")' % role for role in training_roles])
training_labels = '"' + ", ".join(training_roles) + '"'
entity.params['requirements'] = '(GalaxyGroup == "compute") || (%s)' % training_expr if training_expr else '(GalaxyGroup == "compute")'
entity.params['+Group'] = training_labels
entity.params['accounting_group_user'] = str(user.id)
- id: remote_resources
if: user is not None
execute: |
from tpv.core.entities import Tag, TagSetManager, TagType
user_preferences = user.extra_preferences
pulsar_tag = user_preferences.get("distributed_compute|remote_resources", "None")
pulsar_tag = Tag("scheduling", pulsar_tag, TagType.REQUIRE) if pulsar_tag != "None" else None
if pulsar_tag:
entity.tpv_tags = entity.tpv_tags.combine(
TagSetManager(tags=[pulsar_tag])
)
- id: cz-pulsar_alphafold
if: |
all((
"cz-pulsar" in {tag.value for tag in entity.tpv_tags.tags},
tool.id.startswith("toolshed.g2.bx.psu.edu/repos/galaxy-australia/alphafold2/alphafold"),
helpers.tool_version_gte(tool, '2.3.1'),
))
gpus: 1
rank: |
final_destinations = helpers.weighted_random_sampling(candidate_destinations)
final_destinations