-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathmain.nf
More file actions
42 lines (36 loc) · 1.01 KB
/
main.nf
File metadata and controls
42 lines (36 loc) · 1.01 KB
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
process STIMULUS_PREDICT {
tag "${meta.id}"
label 'process_medium'
container "docker.io/mathysgrapotte/stimulus-py:dev"
input:
tuple val(meta) , path(model), path(model_config), path(weigths)
tuple val(meta2), path(data)
output:
tuple val(meta), path("${prefix}-pred.safetensors"), emit: predictions
path "versions.yml" , emit: versions
script:
prefix = task.ext.prefix ?: meta.id
def args = task.ext.args ?: ""
"""
stimulus predict \
-d ${data} \
-m ${model} \
-c ${model_config} \
-w ${weigths} \
-o ${prefix}-pred.safetensors \
${args}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
stimulus: \$(stimulus -v | cut -d ' ' -f 3)
END_VERSIONS
"""
stub:
prefix = task.ext.prefix ?: meta.id
"""
touch ${prefix}-pred.safetensors
cat <<-END_VERSIONS > versions.yml
"${task.process}":
stimulus: \$(stimulus -v | cut -d ' ' -f 3)
END_VERSIONS
"""
}