-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdogme.nf
executable file
·44 lines (34 loc) · 1.13 KB
/
dogme.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
#!/usr/bin/env nextflow
nextflow.enable.dsl=2
include { modWorkflow } from './nanoporeModule'
def getParamOrDefault(param, defaultValue) {
if (param == null || param == 'null' || param == 'undefined' || !param) {
return defaultValue
} else {
return param
}
}
// Set the default value at the workflow level
def dogmeVersion = "0.88"
// Set the default value at the workflow level
def defaultModDir = "${launchDir}/doradoModels"
workflow {
modDir = getParamOrDefault(params.modDir, defaultModDir)
params.modDir = modDir
println "dogme.nf modDir = ${modDir}"
modWorkflow(dogmeVersion, 'sup,inosine_m6A,pseU,m5C', modDir)
}
// Define other processes similarly, ensuring they take `rnaMod` as an input
workflow.onComplete {
// Execute cleanup command
def cleanCommand = "rm -rf ${workflow.workDir}/*"
println "Cleaning up work directory..."
def process = cleanCommand.execute()
process.waitFor()
if (process.exitValue() == 0) {
println "Work directory cleaned successfully."
} else {
println "Failed to clean work directory."
println process.err.text
}
}