-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.nf
41 lines (32 loc) · 1.14 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
#!/usr/bin/env nextflow
nextflow.enable.dsl=2
//---------------------------------------------------------------
// Param Checking
//---------------------------------------------------------------
if(params.queryFastaFile) {
seqs = Channel.fromPath( params.queryFastaFile ).splitFasta( by:params.fastaSubsetSize, file:true )
}
else {
throw new Exception("Missing params.queryFastaFile")
}
if (params.preConfiguredDatabase) {
if (!params.database) {
throw new Exception("Missing params.database")
}
}
//--------------------------------------------------------------------------
// Includes
//--------------------------------------------------------------------------
include { nonConfiguredDatabase } from './modules/diamondSimilarity.nf'
include { preConfiguredDatabase } from './modules/diamondSimilarity.nf'
//--------------------------------------------------------------------------
// Main Workflow
//--------------------------------------------------------------------------
workflow {
if (params.preConfiguredDatabase) {
preConfiguredDatabase(seqs, params.targetDatabaseIndex)
}
else {
nonConfiguredDatabase(seqs)
}
}