-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnextflow.config
115 lines (101 loc) · 3.02 KB
/
nextflow.config
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
manifest {
author = 'James Zlosnik (nextflow pipeline)/Kevin Kuchinski (FluViewer)'
name = 'BCCDC-PHL/fluviewer-nf'
version = '0.3.1'
description = 'BCCDC-PHL FluViewer'
mainScript = 'main.nf'
nextflowVersion = '>=20.01.0'
}
params {
profile = false
cache = ''
outdir = 'results'
fastq_input = 'NO_FILE'
samplesheet_input = 'NO_FILE'
illumina_suffixes = ['*_R{1,2}_001', '*_R{1,2}', '*_{1,2}' ]
fastq_exts = ['.fastq.gz', '.fq.gz', '.fastq', '.fq']
fastq_search_path = makeFastqSearchPath( illumina_suffixes, fastq_exts )
primer_path = "${baseDir}/assets/"
primers = "${baseDir}/assets/primers.fa"
rev_primers = "${baseDir}/assets/primers_rev_comp.fa"
pipeline_short_name = parsePipelineName(manifest.toMap().get('name'))
pipeline_minor_version = parseMinorVersion(manifest.toMap().get('version'))
run_name = parseRunName( fastq_input )
target_depth = 200
min_depth = 10
min_q = 30
min_cov = 25
min_ident = 95
h1_dataset = 'NO_FILE'
h3_dataset = 'NO_FILE'
h5_dataset = 'NO_FILE'
db = 'NO_FILE'
blastx_subtype_db = "${projectDir}/assets/blastx/blastx_subtype_db.fasta"
genoflu_cache = "${projectDir}/assets/genoflu"
genoflu_github_url = 'https://github.com/USDA-VS/GenoFLU/'
genoflu_version = "LATEST"
}
def makeFastqSearchPath ( illumina_suffixes, fastq_exts ) {
def fastq_search_path = []
for (suffix in illumina_suffixes){
for (ext in fastq_exts) {
fastq_search_path.add(params.fastq_input.toString() + '/' + suffix.toString() + ext.toString())
}
}
return fastq_search_path
}
// this uses a regex invocation using the =~ to pull out the folder name
def parseRunName ( fastq_input ) {
run_name = (params.fastq_input =~ /([^\/]+)\/?$/)[0][1]
if (!run_name) {
throw new RuntimeException("ERROR: Parsing run name from FASTQ path failed.")
}
return run_name
}
def parseMinorVersion(version) {
minor_version = version.split('\\.')[0..1].join('.')
return minor_version
}
def parsePipelineName(name) {
short_name = name.split('/')[1]
return short_name
}
profiles {
conda {
conda.enabled = true
process.conda = "$baseDir/environments/environment.yml"
if (params.cache) {
conda.cacheDir = params.cache
}
conda.useMamba = true
}
}
process {
withName: normalize_depth {
conda = "$baseDir/environments/fluviewer.yml"
memory = '50 GB'
}
withName: fluviewer {
conda = "$baseDir/environments/fluviewer.yml"
cpus = 8
}
withName: cutadapt {
cpus = 8
}
withName: clade_calling {
conda = "$baseDir/environments/nextclade.yml"
cpus = 4
}
}
report {
enabled = true
file = "${params.outdir}/${params.run_name}_fluviewer-nf_nextflow_report.html"
}
timeline {
enabled = true
file = "${params.outdir}/${params.run_name}_fluviewer-nf_nextflow_timeline.html"
}
trace {
enabled = true
file = "${params.outdir}/${params.run_name}_fluviewer-nf_nextflow_trace.txt"
}