-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.nf
77 lines (66 loc) · 2.44 KB
/
main.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
include { ESMFOLD_INFERENCE } from './modules/esmfold'
include { ESMIF_SCORE_LOGLIK } from './modules/esmif'
include { OPENMM_PDB_RELAX } from './modules/openmm'
// printing message of the day
motd = """
--------------------------------------------------------------------------
quick-fold-nf ($workflow.manifest.version)
--------------------------------------------------------------------------
Session ID : $workflow.sessionId
--------------------------------------------------------------------------
Input/output options
--------------------------------------------------------------------------
Query file : $params.inputFile
Results directory : $params.resultsDir
--------------------------------------------------------------------------
Analysis options
--------------------------------------------------------------------------
ESMFold args : $params.esmfold.args
OpenMM PDB relax : $params.openmm.pdb.relax.args
--------------------------------------------------------------------------
Environment information
--------------------------------------------------------------------------
Container : $workflow.container
Config files : $workflow.configFiles
Project dir : $workflow.projectDir
Work dir : $workflow.workDir
Launch dir : $workflow.launchDir
Command line : $workflow.commandLine
Repository : $workflow.repository
CommitID : $workflow.commitId
Revision : $workflow.revision
--------------------------------------------------------------------------
"""
log.info motd
process TELEMETRY {
publishDir "${params.resultsDir}", mode: 'copy', overwrite: 'yes'
output:
path('info.txt')
shell:
"""
echo '${motd}' > info.txt
"""
stub:
"""
touch info.txt
"""
}
workflow QUICK_FOLD {
TELEMETRY()
channel.fromPath("${params.inputFile}") \
| ESMFOLD_INFERENCE \
| flatten \
| map{ it -> tuple(it.simpleName, it) } \
| OPENMM_PDB_RELAX
}
workflow QUICK_FOLD_SCORE {
TELEMETRY()
fasta_ch = channel.fromPath("${params.inputFile}")
pdb_ch = channel.fromPath("${params.esmif.score.wildtype}").map { it -> tuple(it.simpleName, it)}
OPENMM_PDB_RELAX(pdb_ch)
ESMIF_SCORE_LOGLIK(fasta_ch, OPENMM_PDB_RELAX.out.map{ it -> it[1] })
}
workflow{
QUICK_FOLD()
QUICK_FOLD_SCORE()
}