-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnf-test-ds2.nf
More file actions
48 lines (39 loc) · 930 Bytes
/
Copy pathnf-test-ds2.nf
File metadata and controls
48 lines (39 loc) · 930 Bytes
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
nextflow.enable.dsl=2
process getVersionNo {
output:
stdout emit: version_no
script:
"""
echo "v1.2.4"|tr -d '\n'
"""
}
process categorize {
input:
tuple val(x) , path(hello_file)
val(version_no)
output:
path "${hello_file}.${x}.${version_no}.copy.txt"
script:
"""
cat ${hello_file}>${hello_file}.${x}.${version_no}.copy.txt
"""
}
process handle_valid {
input:
path file_name
tuple val(x) , path(hello_file)
output:
path "${file_name}.yet.another.copy.txt"
"""
cat ${hello_file} ${file_name} > ${file_name}.yet.another.copy.txt
"""
}
workflow {
file_list=channel
.fromPath("./fofn.txt")
.splitCsv(header: false, strip: true)
.map { line ->[ line[0].tokenize("/")[-1].tokenize('.')[0],file(line[0])] }
bwa = getVersionNo()
results = categorize(file_list,bwa)
valid_results = handle_valid(results,file_list)
}