-
Notifications
You must be signed in to change notification settings - Fork 3
/
nextflow.config
222 lines (196 loc) · 8.3 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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
params {
fq_map = "fastq_map.tsv"
parasite {
fasta = "$projectDir/ref/PlasmoDB-44_Pfalciparum3D7_Genome.fasta"
fasta_prefix = "$projectDir/ref/PlasmoDB-44_Pfalciparum3D7_Genome"
}
host{
fasta = ["$projectDir/ref/host/hg38.fasta"]
fasta_prefix = ["$projectDir/ref/host/hg38"]
}
// Original known_snps_unsorted.vcf has 944,270 SNPs (from previous lab members).
// The updated file is pf_crosses_v1/known_variants.vcf which has 66,121 variants (snp/indels)
// The later is generated following the MalariaGen Pf6 paper:
// MalariaGEN, et al. (2021). An open dataset of Plasmodium falciparum
// genome variation in 7,000 worldwide samples. Wellcome Open Res 6, 42.
// 10.12688/wellcomeopenres.16168.2.
known_sites = ["$projectDir/ref/pf_crosses_v1/known_variants.vcf"]
genome_intervals = [
"chromosomes": [ "Pf3D7_01_v3", "Pf3D7_02_v3", "Pf3D7_03_v3", "Pf3D7_04_v3", "Pf3D7_05_v3",
"Pf3D7_06_v3", "Pf3D7_07_v3", "Pf3D7_08_v3", "Pf3D7_09_v3", "Pf3D7_10_v3", "Pf3D7_11_v3",
"Pf3D7_12_v3", "Pf3D7_13_v3", "Pf3D7_14_v3", ],
"intervals": [
"Pf3D7_01_v3:1-459121", "Pf3D7_01_v3:459122-640851",
"Pf3D7_02_v3:1-448875", "Pf3D7_02_v3:448876-947102",
"Pf3D7_03_v3:1-599046", "Pf3D7_03_v3:599047-1067971",
"Pf3D7_04_v3:1-599045", "Pf3D7_04_v3:599046-1200490",
"Pf3D7_05_v3:1-456496", "Pf3D7_05_v3:456497-906340", "Pf3D7_05_v3:906341-1343557",
"Pf3D7_06_v3:1-479812", "Pf3D7_06_v3:479813-974069", "Pf3D7_06_v3:974070-1418242",
"Pf3D7_07_v3:1-317635", "Pf3D7_07_v3:317636-810481", "Pf3D7_07_v3:810482-1445207",
"Pf3D7_08_v3:1-300241", "Pf3D7_08_v3:300242-839582", "Pf3D7_08_v3:839583-1472805",
"Pf3D7_09_v3:1-606468", "Pf3D7_09_v3:606469-1243310", "Pf3D7_09_v3:1243311-1541735",
"Pf3D7_10_v3:1-592199", "Pf3D7_10_v3:592200-1120767", "Pf3D7_10_v3:1120768-1687656",
"Pf3D7_11_v3:1-457696", "Pf3D7_11_v3:457697-979940", "Pf3D7_11_v3:979941-1516077", "Pf3D7_11_v3:1516078-2038340",
"Pf3D7_12_v3:1-668701", "Pf3D7_12_v3:668702-1283920", "Pf3D7_12_v3:1283921-1769193", "Pf3D7_12_v3:1769194-2271494",
"Pf3D7_13_v3:1-546554", "Pf3D7_13_v3:546555-1169276", "Pf3D7_13_v3:1169277-1702600",
"Pf3D7_13_v3:1702601-2368558", "Pf3D7_13_v3:2368559-2925236",
"Pf3D7_14_v3:1-568024", "Pf3D7_14_v3:568025-1073306", "Pf3D7_14_v3:1073307-1605259",
"Pf3D7_14_v3:1605260-2121870", "Pf3D7_14_v3:2121871-2706733", "Pf3D7_14_v3:2706734-3291936",
]
]
// to allow specifying a key for the above map `genome_intervals`: "chromosomes" or "intervals"
split = "chromosomes"
// to allow the pipeline to stop before haplotypecaller process and just obtain bam coverage information
coverage_only = false
// to allow the pipeline to stop after haplotypecaller calls (without joint call)
gvcf_only = false
hard = true
hard_filters = [
[name: "QD.lt.2", filter: "QD<2.0"],
[name: "FS.gt.60", filter: "FS>60.0"],
[name: "MQ.lt.40", filter: "MQ<40.0"],
[name: "MQRankSum.lt.-12.5", filter: "MQRankSum<-12.5"],
[name: "ReadPosRankSum.lt.-8", filter: "ReadPosRankSum<-8.0"]
]
// vqsr is off by default, because the test data is too small and will cause error/crash
vqsr = false
vqsr_resources = [
[name: 'jacob2014_microarray_liftover', type: 'truth', prior: 15, vcf: "$projectDir/ref/jacob2014_chip_sites.vcf" ],
[name: 'Pfcross1_3d7_hb3_gatk_pass', type: 'training', prior: 12, vcf: "$projectDir/ref/pf_crosses_v1/pass_3d7_hb3.gatk.final.vcf.gz" ],
[name: 'Pfcross1_7g8_gb4_gatk_pass', type: 'training', prior: 12, vcf: "$projectDir/ref/pf_crosses_v1/pass_7g8_gb4.gatk.final.vcf.gz" ],
[name: 'Pfcross1_hb3_dd2_gatk_pass', type: 'training', prior: 12, vcf: "$projectDir/ref/pf_crosses_v1/pass_hb3_dd2.gatk.final.vcf.gz" ]
]
vqsr_opts = "-an QD -an FS -an SOR -an DP --max-gaussians 3 --mq-cap-for-logit-jitter-transform 70 "
vqsr_mode = "SNP"
// for coverage summary (here only consider autosomes)
genome_size_bp = 23292622
chrom_reg = "Pf3D7_[0-9]+_v3"
outdir = "result"
gatk_tmpdir = "${launchDir}/tmpdir"
}
env {
TMPDIR="${launchDir}/tmpdir"
}
profiles{
standard {
executor {
name = 'local'
queueSize = 10
pollInterval = '30 sec'
}
conda.enabled = true
process {
// For the simplicity of configuration, a yaml file is used. In this case,
// nextflow will install the snp_call_nf environment in a cache folder.
conda = "$projectDir/env/snp_call_nf.yaml"
// If the snp_call_fn environment is already installed,
// one can specify the full path to the existing environment folder.
// conda = "${CONDA_PREFIX_1}/envs/snp_call_nf"
cache = 'lenient'
errorStrategy = {task.attempt < 5 ? 'retry': 'ignore'}
maxRetries = 5
cpus = 1
memory = '5 GB'
withName: 'BOWTIE2.*' {
cpus = 3
}
withName: 'SAMTOOLS_FASTQ' {
cpus = 3
}
withName: 'GATK_GENOMICS_DB_IMPORT' {
cpus = 10
memory = '50 GB'
}
withName: 'GATK_GENOTYPE_GVCFS' {
cpus = 10
memory = '50 GB'
}
}
}
sge {
executor {
name = 'sge'
queueSize = 100
pollInterval = '30 sec'
}
conda.enabled = true
process {
// For the simplicity of configuration, a yaml file is used. In this case,
// nextflow will install the snp_call_nf environment in a cache folder.
conda = "$projectDir/env/snp_call_nf.yaml"
// If the snp_call_fn environment is already installed,
// one can specify the full path to the existing environment folder.
// conda = "${CONDA_PREFIX_1}/envs/snp_call_nf"
// Cache keys are created indexing input files path and size
// attributes (this policy provides a workaround for incorrect
// caching invalidation observed on shared file systems due to
// inconsistent files timestamps).
cache = 'lenient'
errorStrategy = {task.attempt < 5 ? 'retry': 'ignore'}
maxRetries = 5
cpus = 1
memory = '5 GB'
queue = "threaded.q"
penv = "thread"
clusterOptions = "-P toconnor-lab -cwd -V"
withName: "BOWTIE2.*" {
cpus = 3
}
withName: 'SAMTOOLS_FASTQ' {
cpus = 3
}
withName: 'GATK_GENOMICS_DB_IMPORT' {
cpus = 10
memory = '50 GB'
}
withName: 'GATK_GENOTYPE_GVCFS' {
cpus = 10
memory = '50 GB'
}
}
}
slurm {
executor {
name = 'slurm'
queueSize = 100
pollInterval = '30 sec'
}
conda.enabled = true
process {
conda = "$projectDir/env/snp_call_nf.yaml"
cache = 'lenient'
errorStrategy = {task.attempt < 5 ? 'retry': 'ignore'}
maxRetries = 5
cpus = 1
memory = '5 GB'
clusterOptions = '--account=igs'
withName: "BOWTIE2.*" {
cpus = 3
}
withName: 'SAMTOOLS_FASTQ' {
cpus = 3
}
withName: 'GATK_GENOMICS_DB_IMPORT' {
cpus = 10
memory = '50 GB'
}
withName: 'GATK_GENOTYPE_GVCFS' {
cpus = 10
memory = '50 GB'
}
}
}
}
manifest {
name = 'snp_call_nf'
author = 'Bing Guo'
homePage = 'https://github.com/snp_call_nf'
description = 'Nextflow plasmodium SNP call pipeline'
mainScript = 'main.nf'
nextflowVersion = '>=21.04.0'
version = '0.1.1'
}
trace {
enabled = true
fields = 'task_id,hash,native_id,name,status,exit,realtime,%cpu,rss'
}