-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathproteinortho.nf
63 lines (41 loc) · 1.12 KB
/
proteinortho.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
55
56
57
58
#!/usr/bin/env nextflow
(f1, f2, f3) = Channel.fromPath(params.fasta).separate(3){ [it,it,it] }
params.cpus = 1
params.outdir = 'proteinortho_out'
outdir = file(params.outdir)
outdir.mkdirs()
process indexGenomes {
container 'robsyme/proteinortho'
storeDir outdir
input:
file '*' from f1.toList()
output:
file '*' into db1
file '*' into db2
"proteinortho5.pl -step=1 *.fasta"
}
def list = []
f2.eachWithIndex{ unit, idx -> list.add(idx) }
process runBlasts {
container 'robsyme/proteinortho'
storeDir outdir
input:
file '*' from db1
file "*" from f2.toList()
each index from list[0..-3]
output:
file 'myproject.*' into blastresults
"proteinortho5.pl -verbose -step=2 -startat=$index -stopat=$index -cpus=${params.cpus} *.fasta"
}
process performClustering {
container 'robsyme/proteinortho'
storeDir outdir
input:
file '*' from blastresults
file '*' from db2
file '*' from f3.toList()
output:
file 'myproject.*' into proteinortho_out
"proteinortho5.pl -step=3 -singles -verbose *.fasta"
}
proteinortho_out.flatten().subscribe{ println("Proteinortho output file: $it") }