This repository has been archived by the owner on Mar 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.nf
55 lines (42 loc) · 1.46 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
#!/usr/bin/env nextflow
nextflow.preview.dsl=2
include abundance from './abundance'
/* ############################################################################
* Default parameter values.
* ############################################################################
*/
params.database_path = 'databases'
params.database = 'Standard_v2'
params.read_length = 100
params.threshold = 10
params.sequences = 'sequences'
params.outdir = 'results'
/* ############################################################################
* Define an implicit workflow that only runs when this is the main nextflow
* pipeline called.
* ############################################################################
*/
workflow {
log.info """
************************************************************
kraken2 & bracken abundance estimation
======================================
FASTQ Path: ${params.sequences}
Results Path: ${params.outdir}
Kraken Database Path: ${params.database_path}
Selected Kraken Database: ${params.database}
Read length: ${params.read_length}
Bracken threshold: ${params.threshold}
************************************************************
"""
databases = Channel.fromPath("${params.database_path}",
type: 'dir',
checkIfExists: true
)
fastq_triples = Channel.fromFilePairs("${params.sequences}/**{1,2}.fastq.gz",
checkIfExists: true,
flat: true
)
levels = Channel.of('F', 'G', 'S')
abundance(databases, fastq_triples, levels)
}