-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathmain.nf
More file actions
41 lines (34 loc) · 1.12 KB
/
main.nf
File metadata and controls
41 lines (34 loc) · 1.12 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
process STIMULUS_SPLIT_YAML {
tag "$meta.id"
label 'process_low'
// TODO: push image to nf-core quay.io
container "docker.io/mathysgrapotte/stimulus-py:dev"
input:
tuple val(meta), path(data_config)
output:
tuple val(meta), path("*_encode.yaml") , emit: encode_config
tuple val(meta), path("*_split.yaml") , emit: split_config
tuple val(meta), path("*_transform.yaml") , emit: transform_config
path "versions.yml" , emit: versions
script:
"""
stimulus split-yaml -y ${data_config} --out-dir ./
cat <<-END_VERSIONS > versions.yml
"${task.process}":
stimulus: \$(stimulus -v | cut -d ' ' -f 3)
END_VERSIONS
"""
stub:
def prefix = data_config.baseName
"""
touch ${prefix}_encode.yaml
touch ${prefix}_RandomSplit_70-30_split.yaml
touch ${prefix}_noise_std0.1_transform.yaml
touch ${prefix}_noise_std0.2_transform.yaml
touch ${prefix}_noise_std0.3_transform.yaml
cat <<-END_VERSIONS > versions.yml
"${task.process}":
stimulus: \$(stimulus -v | cut -d ' ' -f 3)
END_VERSIONS
"""
}