forked from stevekm/nextflow-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.nf
54 lines (41 loc) · 1.22 KB
/
test.nf
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
Channel.from( ['Sample1','Sample2','Sample3','Sample4'] ).into { samples; samples2 }
samples2.subscribe { println "samples2: ${it}" }
process make_file {
tag { "${sampleID}" }
publishDir "${params.output_dir}/make_file", mode: 'copy', overwrite: true
echo true
executor "local"
input:
val(sampleID) from samples
output:
file "${sampleID}.txt" into samples_files, samples_files2, samples_files3
set val(sampleID), file("${sampleID}.txt") into samples_files4
script:
"""
echo "[make_file]: ${sampleID}"
echo "[make_file]: ${sampleID}" > "${sampleID}.txt"
"""
}
samples_files2.subscribe { println "[samples_files2]: ${it}" }
samples_files3.collectFile(name: "samples_files3.txt", storeDir: "${params.output_dir}")
process get_files {
tag { "${sampleID}" }
echo true
executor "local"
input:
set val(sampleID), file(samples_file) from samples_files4
script:
"""
echo "[get_files] sampleID: ${sampleID}, samples_file: ${samples_file}"
"""
}
process get_all_files {
echo true
executor "local"
input:
file(samples_files: "*") from samples_files.collect()
script:
"""
printf "[get_all_files] %s" "${samples_files}"
"""
}