-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnextflow.config
More file actions
169 lines (161 loc) · 5.47 KB
/
nextflow.config
File metadata and controls
169 lines (161 loc) · 5.47 KB
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
manifest {
name = 'BCCDC-PHL/riboscope'
description = 'Mutation monitoring of rRNA genes'
mainScript = 'main.nf'
nextflowVersion = '>=24.10.6'
version = '0.9.9'
}
def makeFastqSearchPath ( base_path, fastq_suffixes, fastq_exts ) {
def fastq_search_path = []
for (suffix in fastq_suffixes){
for (ext in fastq_exts) {
fastq_search_path.add(base_path.toString() + '/' + suffix.toString() + ext.toString())
}
}
return fastq_search_path
}
def parseMinorVersion(version) {
minor_version = version.split('\\.')[0..1].join('.')
return minor_version
}
def parsePipelineName(name) {
short_name = name.split('/')[1]
return short_name
}
params {
profile = false
cache = ''
illumina_suffixes = ['*_R{1,2}_001', '*_R{1,2}', '*_{1,2}' ]
nanopore_suffixes = ['*_RL']
fastq_exts = ['.fastq.gz', '.fq.gz', '.fastq', '.fq']
fastq_search_path = makeFastqSearchPath( params.fastq_input, illumina_suffixes, fastq_exts )
fastq_input = 'NO_FILE'
samplesheet_input = 'NO_FILE'
ref = 'NO_FILE'
bed = 'NO_FILE'
gff = 'NO_FILE' // to reassign vcf coords according to features provided
search_seqs = 'NO_FILE'
align_untrimmed_reads = false
min_qual_for_variant_calling = 20
min_depth = 50
max_depth = 0
min_lofreq_cov = params.min_depth
min_vaf = 0
min_iupac = params.min_vaf // vaf < min_iupac = ref in consensus. sites with alt alleles between min_iupac & max_iupac = mixed
max_iupac = 0.9 // vaf that an alt is called in consensus
qualimap_memory = '4G'
qualimap_coverage_histogram_limit = 100
coverage_plot_y_limit = 2000
coverage_plot_log_scale = false
coverage_plot_width_inches_per_mb = 400
coverage_plot_height_inches_per_chrom = 6
coverage_plot_window_size = 50
outdir = 'results'
collect_outputs = false
collected_outputs_prefix = 'collected'
pipeline_short_name = parsePipelineName(manifest.toMap().get('name'))
pipeline_minor_version = parseMinorVersion(manifest.toMap().get('version'))
skip_alignment_cleaning = true
apply_qc = false
amplicon_groups = "rpt1_pool1_,rpt1_pool2_,rpt2_pool1_,rpt2_pool2_"
min_amplicon_count = 300 // minimum median count to consider an amplicon as sufficiently sequenced
min_q20_rate = 0.95
min_q30_rate = 0.85
min_mean_bq = 30
min_mean_depth = 100 //minimum mean depth of coverage != min_depth (var calling)
min_mapped_paired = 1000
min_percent_mapped = 0.8
min_mapped_reads = 100
min_mean_mq = 50
min_10X_cov = 0.85
min_50X_cov = 0.85
max_secondary = 0
min_pos_count = 100 // positive control query seq count
max_qc_flags = 5 //maximum number of allowable flags before sample fails QC
qc_output = "qc_summary"
html_template = "$baseDir/assets/report_template.html"
// taxonomy related params
kraken2_db = 'NO_FILE'
bracken_db = 'NO_FILE'
taxonomy_level = "S1"
read_length = 150
host_name = "Homo sapiens"
pathogen_name = "Treponema"
kraken2_output = "kraken2_summary"
min_pathogen = 85.0 // minimum percentage of reads in a sample classified as pathogen
max_host = 5.0
// reporting - related params
reporting_vaf = 0.9
reporting_sample_perc = 0.3
}
plugins {
id 'nf-prov@1.3.0'
}
prov {
enabled = true
formats {
// bco {
// file = "${params.outdir}/bco.json"
// overwrite = true
// }
// contains script block run
legacy {
file = "${params.outdir}/provenance.json"
overwrite = true
}
}
}
profiles {
conda {
conda.enabled = true
process.conda = "$baseDir/environments/environment.yml"
if (params.cache){
conda.cacheDir = params.cache
}
}
apptainer {
apptainer.enabled = true
process.container = "oras://ghcr.io/bccdc-phl/riboscope:db63e1f9b948f0d6"
if (params.cache){
apptainer.cacheDir = params.cache
}
}
test {
params.fastq_input = "${projectDir}/tests/data"
params.illumina_suffixes = ['*_R{1,2}_001', '*_R{1,2}', '*_{1,2}' ]
params.fastq_exts = ['.fastq.gz', '.fq.gz', '.fastq', '.fq']
params.fastq_search_path = makeFastqSearchPath( params.fastq_input, params.illumina_suffixes, params.fastq_exts )
params.search_seqs = "${projectDir}/tests/data/unique_amplicon_seqs.fa"
params.ref = "${projectDir}/tests/data/test_ref.fa"
params.bed = "${projectDir}/tests/data/ribo_repeat1.bed"
params.gff = "${projectDir}/tests/data/test.gff3"
params.kraken2_db_url = "https://genome-idx.s3.amazonaws.com/kraken/16S_Greengenes13.5_20200326.tgz"
params.outdir = "riboscope_test_results"
params.min_amplicon_count = 40
params.min_depth = 1
params.min_pathogen = 1.0
params.max_qc_flags = 12
params.apply_qc = true
}
}
process {
withName: 'bwa_mem|extract_fastq_from_bam' {
cpus = 24
}
withName: qualimap_bamqc {
cpus = 16
memory = '36G'
}
withName: 'plot_coverage|qc_filter|report_results|summarize_kraken2|adjust_variant_coordinates' {
conda = "$baseDir/environments/py_environment.yml"
container = "oras://ghcr.io/bccdc-phl/riboscope_py:0512a57d1cc7b516"
}
withName: plot_amplicon_coverage {
conda = "$baseDir/environments/py_environment.yml"
container = "oras://ghcr.io/bccdc-phl/riboscope_py:0512a57d1cc7b516"
}
withLabel: 'kraken2_bracken' {
cpus = 8
memory = '72 GB'
}
}