-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.nf
43 lines (34 loc) · 1.17 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
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { ARB } from './workflows/arbitrary_grid'
include { ONE } from './workflows/one_reference'
include { TWO } from './workflows/two_references'
include { XINDEX } from './subworkflows/xenome_index'
workflow {
Channel
.from(file(params.input))
.splitCsv(header:true, sep:',')
.map( { it -> [ (it.sample), it ] } )
.set{ samples }
if ( params.workflow == "arbitrary_grid" ) {
ARB ( samples )
}
if ( params.workflow == "one_reference" ) {
ONE ( samples )
}
if ( params.workflow == "two_references" ) {
TWO ( samples )
}
if ( params.workflow == "deconvolution_indices" ) {
if ( params.deconvolution_tool == "xenome" ) {
if ( !file("${params.deconvolution_indices_path}/${params.deconvolution_indices_name}-both.kmers.low-bits.lwr").exists() ) {
XINDEX ( )
}
}
else if ( params.deconvolution_tool == "xengsort" ) {
if ( !file("${params.deconvolution_indices_path}/${params.deconvolution_indices_name}-xind.hash").exists() ) {
XINDEX ( )
}
}
}
}