-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.nf
46 lines (36 loc) · 1.45 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
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
/* ############################################################################
* Dependencies from sub modules.
* ############################################################################
*/
include { SOURMASH_BUILD } from './subworkflows/local/sourmash_build'
/* ############################################################################
* Define an implicit workflow that only runs when this is the main nextflow
* pipeline called.
* ############################################################################
*/
workflow {
log.info """
************************************************************
Build Sourmash Index
====================
Genomes: ${params.input}
Taxonomy: ${params.taxonomy == 'MISSING' ? 'Not provided' : params.taxonomy}
Scaling Factors: ${params.scaling_factors}
K-Mer Sizes: ${params.kmer_sizes}
Batch Size: ${params.batch_size}
Results Path: ${params.outdir}
************************************************************
"""
def genomes = Channel.fromPath(params.input, checkIfExists: true)
def taxonomy = params.taxonomy == 'MISSING' ? Channel.fromPath(params.taxonomy) : Channel.fromPath(params.taxonomy, checkIfExists: true)
def kmer_sizes = Channel.of(params.kmer_sizes.split(','))
def scaling_factors = Channel.of(params.scaling_factors.split(','))
SOURMASH_BUILD(
genomes,
taxonomy,
kmer_sizes,
scaling_factors
)
}