-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnextflow.config
171 lines (156 loc) · 6.12 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
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
170
171
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BostonGene/pyigmap Nextflow config file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Default config options for all compute environments
----------------------------------------------------------------------------------------
*/
params {
fq1 = null
fq2 = null
sample_id = "sample"
help = false
library = null
first_reads = "all"
outdir = "./results"
mock_merge_amplicon = false
save_all = false
// PyUMI options
fq1_pattern = null
fq2_pattern = null
out_pyumi_fq1 = "pR1.fastq.gz"
out_pyumi_fq2 = "pR2.fastq.gz"
out_pyumi_json = "pyumi.json"
// CalibDedup options
out_calib_dedup_fq1 = "cR1.fastq.gz"
out_calib_dedup_fq2 = "cR2.fastq.gz"
kmer_size = 4
minimizer_count = 7
minimizer_threshold = 3
error_tolerance = 2
min_reads_per_cluster = 1
max_reads_per_cluster = 50000
// Fastp options
out_fastp_fq1 = "mR1.fastq.gz"
out_fastp_fq2 = "mR2.fastq.gz"
out_fastp_fq12 = "mR12.fastq.gz"
out_fastp_json = "fastp.json"
out_fastp_html = "fastp.html"
insert_size = 1
disable = "length_filtering quality_filtering"
// Vidjil options
vidjil_ref = "./bin/vidjil/vidjil.germline.tar.gz"
out_vidjil_fasta = "vidjil.fasta.gz"
out_vidjil_logs = "vidjil.log"
// IgBlast options
igblast_receptor = "all"
igblast_organism = "human"
all_alleles = false
out_igblast_annotation = "raw_annotation.tsv.gz"
igblast_ref = params.all_alleles ? "./bin/igblast/igblast.reference.all_alleles.tar.gz" : \
"./bin/igblast/igblast.reference.major_allele.tar.gz"
// CDR3ErrorCorrector options
olga_models = "./bin/cdr3nt_error_corrector/olga-models.tar.gz"
out_corrected_annotation = "corrected_annotation.tsv"
out_stat_json = "stat.json"
out_archive = "pyigmap.tar.gz"
default_corrector_options = "--error-rate 0.001 --discard-junctions-with-n --only-best-alignment --remove-chimeras"
rnaseq_corrector_options = "--filter-pgen-singletons 0 --top-c-call --top-v-alignment-call"
amplicon_corrector_options = "--skip-pgen-calculation"
}
profiles {
debug {
dumpHashes = true
process.beforeScript = 'echo $HOSTNAME'
cleanup = false
nextflow.enable.configProcessNamesValidation = true
}
standard {
docker.enabled = true
docker.remove = true
podman.enabled = false
podman.remove = false
}
docker {
docker.enabled = true
docker.remove = true
podman.enabled = false
podman.remove = false
}
podman {
docker.enabled = false
docker.remove = false
podman.enabled = true
podman.remove = true
}
}
manifest {
name = "bostongene/pyigmap"
defaultBranch = "main"
homePage = "https://github.com/BostonGene/pyigmap"
description = """A pipeline for extracting and summarizing TCR and BCR gene rearrangements from sequencing data"""
mainScript = "main.nf"
nextflowVersion = ">=24.04.2"
doi = "10.5281/zenodo.11103554"
}
// Load base.config by default for all pipelines
includeConfig 'conf/base.config'
// Nextflow plugins
plugins {
id 'nf-validation@1.1.3' // Validation of pipeline parameters and creation of an input channel from a sample sheet
}
// Capture exit codes from upstream processes when piping
process.shell = ['/bin/bash', '-euo', 'pipefail']
// Disable process selector warnings by default. Use debug profile to enable warnings.
nextflow.enable.configProcessNamesValidation = false
def trace_timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')
timeline {
enabled = true
file = "${params.outdir}/pipeline_info/execution_timeline_${trace_timestamp}.html"
}
report {
enabled = true
file = "${params.outdir}/pipeline_info/execution_report_${trace_timestamp}.html"
}
trace {
enabled = true
file = "${params.outdir}/pipeline_info/execution_trace_${trace_timestamp}.txt"
}
dag {
enabled = true
file = "${params.outdir}/pipeline_info/pipeline_dag_${trace_timestamp}.html"
}
// Load modules.config for DSL2 module specific options
includeConfig 'conf/modules.config'
// Function to ensure that resource requirements don't go beyond
// a maximum limit
def check_max(obj, type) {
if (type == 'memory') {
try {
if (obj.compareTo(params.max_memory as nextflow.util.MemoryUnit) == 1)
return params.max_memory as nextflow.util.MemoryUnit
else
return obj
} catch (all) {
println " ### ERROR ### Max memory '${params.max_memory}' is not valid! Using default value: $obj"
return obj
}
} else if (type == 'time') {
try {
if (obj.compareTo(params.max_time as nextflow.util.Duration) == 1)
return params.max_time as nextflow.util.Duration
else
return obj
} catch (all) {
println " ### ERROR ### Max time '${params.max_time}' is not valid! Using default value: $obj"
return obj
}
} else if (type == 'cpus') {
try {
return Math.min( obj, params.max_cpus as int )
} catch (all) {
println " ### ERROR ### Max cpus '${params.max_cpus}' is not valid! Using default value: $obj"
return obj
}
}
}