-
Notifications
You must be signed in to change notification settings - Fork 0
/
definitions.schema.yaml
406 lines (361 loc) · 11.6 KB
/
definitions.schema.yaml
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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
$schema: "http://json-schema.org/draft-07/schema#"
description: Various definitions
type: object
definitions:
##############################
# Atomic properties for reuse in object properties
##############################
options:
description: program options represented as string, array or dictionary
type: [string, array, object, 'null']
items:
type: string
uniqueItems: true
envmodules:
description: environment module list
type: array
items:
type: string
uniqueItems: true
java_opts:
description: options to pass to java interpreter
type: string
step_size:
description: step size
type: array
minItems: 1
items:
type: integer
minimum: 1
window_size:
description: window size
type: array
minItems: 1
items:
type: integer
minimum: 1
ploidy:
description: >
ploidy for region. Will be adjusted by pool size for pool
calls. The ploidy keys also define sex levels.
type: object
properties:
common:
type: integer
description: ploidy common to all sexes
female:
type: integer
description: ploidy for females
male:
type: integer
description: ploidy for males
haploid:
type: integer
description: ploidy for haploids
additionalProperties: false
tool:
type: string
description: tool to run filter/statistic
default: bcftools
enum: ['gatk', 'bcftools', 'popoolation', 'popoolation2', 'python']
group:
type: string
description: >-
Description of sequencing strategy in terms of grouping, i.e.
either individual or pooled sequencing
enum:
- ind
- pool
regions:
type: array
description: >-
List of region names. The names must be defined in the
workflow configuration section
items:
type: string
uniqueItems: true
sex:
type: string
description: Sample/unit sex.
items:
type: string
uniqueItems: true
enum: ['male', 'female', 'common', 'haploid']
unitids:
type: array
description: >-
List of unit ids/names. The sample ids must be defined in the
'unit' column of a read samplesheet file or the 'SM' column in a
samples samplesheet file
items:
type: string
uniqueItems: true
##############################
# File system layout
##############################
fs:
description: >
file system layout; defines Path objects and wildcards for
snakemake rules
type: object
default: {}
properties:
external:
type: string
default: data/external
interim:
type: string
default: data/interim
metadata:
type: string
default: data/metadata
raw:
type: string
default: data/raw
resources:
type: string
default: resources
additionalProperties: false
##############################
# Main workflow configuration
##############################
workflow:
title: Workflow configuration
description: >
Workflow configuration. Define high-level options that apply
to workflow logic and execution
type: object
default: {}
properties:
variantcallers:
description: Variant callers
type: object
default: {}
properties:
ind:
description: Variant callers for individuals
type: array
default: ['gatkhc']
uniqueItems: true
items:
type: string
enum: ['gatkhc', 'freebayes', 'bcftools']
pool:
description: Variant callers for pools
type: array
uniqueItems: true
default: ['popoolation']
items:
type: string
enum: ['popoolation']
regions:
title: region definitions
description: >
key-value mapping of region name to bed file defining
regions for region-based analyses. If no regions are
provided, the default region *all* will be generated using
the reference file
type: object
default: {}
patternProperties:
'^[a-zA-Z\-_0-9]+$':
properties:
description:
description: description field
type: string
bed:
description: filename for bed file defining regions
type: string
pattern: .+\.bed
examples:
- data/metadata/all.bed
- data/metadata/autosomes.bed
- data/metadata/PAR.bed
ploidy:
$ref: "#/definitions/ploidy"
default:
common: 2
npart:
description: define number of partitions for scatter-gather calls
type: integer
default: 1
required:
- description
- bed
additionalProperties: false
trim:
description: perform adapter trimming or not
type: boolean
default: true
qc:
description: qc programs to run on input and mapped data
type: array
default: ['picard', 'fastqc', 'qualimap', 'jellyfish', 'sambamba', 'bcftools']
uniqueItems: true
items:
type: string
enum:
- picard
- fastqc
- qualimap
- jellyfish
- sambamba
- bcftools
additionalProperties: false
##############################
# Database resources
##############################
db:
description: >
Configuration for various database resources
type: object
default: {}
properties:
ref:
description: Reference sequence name; path to sequence file
type: string
default: ""
repeats:
description: Bed file indicating repeat regions
type: string
pattern: (|.+\.bed$)
default: ""
additionalProperties: false
##############################
# Rule definitions
##############################
rule.config:
title: Rule configuration
description: generic configuration for rules
type: object
default: {}
properties:
options:
$ref: "#/definitions/options"
envmodules:
$ref: "#/definitions/envmodules"
##############################
# Java rule
##############################
rule.java.config:
title: Java rule configuration
description: generic configuration for java rules
type: object
properties:
options:
$ref: "#/definitions/options"
envmodules:
$ref: "#/definitions/envmodules"
java_opts:
$ref: "#/definitions/java_opts"
##############################
# Windowed rule
##############################
rule.window.config:
title: Windowed rule configuration
description: generic configuration for rules that do sliding window analyses
type: object
properties:
options:
$ref: "#/definitions/options"
envmodules:
$ref: "#/definitions/envmodules"
step_size:
$ref: "#/definitions/step_size"
window_size:
$ref: "#/definitions/window_size"
##############################
# Rules; defines property for the vast majority of workflow
# rules. This section is reused in its entirety in
# config.schema.yaml in the patternProperties property listing
##############################
rules.config:
title: Rule configuration
description: >
This schema defines rule schemas for all rules in the workflow.
type: object
default: {}
# Rules with specific defaults must be listed explicitly
properties:
# Trimming rules
trim_cutadapt_pe:
default:
adapters: -a AGATCGGAAGAGCACACGTCTGAACTCCAGTCA -A AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT
$ref: "trim.schema.yaml#/definitions/rule.cutadapt.config"
trim_cutadapt_se:
default:
adapters: -a AGATCGGAAGAGCACACGTCTGAACTCCAGTCA
$ref: "trim.schema.yaml#/definitions/rule.cutadapt.config"
map_bwa_mem:
default: {}
$ref: "map.schema.yaml#/definitions/map_bwa_mem"
# QC rules
qc_jellyfish:
default: {}
$ref: "tools.schema.yaml#/definitions/jellyfish.config"
qc_jellyfish_count:
default:
options: -s 100M -C
$ref: "#/definitions/rule.config"
qc_picard_mark_duplicates:
default:
options: "-VALIDATION_STRINGENCY LENIENT -REMOVE_DUPLICATES true"
$ref: "#/definitions/rule.config"
popoolation_samtools_filter_mpileup:
default:
filter_options: -q 20
$ref: "#/definitions/rule.config"
popoolation_subsample_pileup:
default:
options:
--method withoutreplace --fastq-type sanger --target-coverage 50 --max-coverage 100 --min-qual 20
$ref: "#/definitions/rule.config"
popoolation_variance_sliding:
default:
window_size: [50000]
step_size: [50000]
$ref: "popoolation.schema.yaml#/definitions/popoolation_variance_sliding"
qc_picard_collect_alignment_summary_metrics:
default:
options: "VALIDATION_STRINGENCY=LENIENT METRIC_ACCUMULATION_LEVEL=null METRIC_ACCUMULATION_LEVEL=SAMPLE"
$ref: "#/definitions/rule.config"
qc_picard_collect_insert_size_metrics:
default:
options: "VALIDATION_STRINGENCY=LENIENT METRIC_ACCUMULATION_LEVEL=null METRIC_ACCUMULATION_LEVEL=SAMPLE"
$ref: "#/definitions/rule.config"
rawvc_gatkhc_targets:
default: {}
$ref: "rawvc.schema.yaml#/definitions/rule.gatk.annotation"
rawvc_gatk_genotype_gvcfs:
default: {}
$ref: "rawvc.schema.yaml#/definitions/rule.gatk.annotation"
##############################
# patternProperties: only for validation; not possible to set defaults
##############################
patternProperties:
^(filter_bcftools_concat_vcfs|statistic_windowed_vcf)$:
$ref: "#/definitions/rule.config"
^qc_(multiqc|fastqc|jellyfish_histo|qualimap_bamqc_pe|qualimap_bamqc_se|sambamba_depth|bcftools_stats)$:
description: qc rule configuration
$ref: "#/definitions/rule.config"
^map_(samtools_faidx_ref|samtools_index|bwa_index|picard_merge_sam)$:
description: map rules
$ref: "#/definitions/rule.config"
^rawvc_(picard_create_sequence_dictionary|gatk_genomics_db_import|picard_merge_vcfs_targets)$:
description: rawvc java rules
$ref: "#/definitions/rule.java.config"
^rawvc_(samtools_faidx_ref|bcftools_concat_vcfs_targets)$:
description: rawvc rules
$ref: "#/definitions/rule.config"
^filter_(vcf_select|vcf_filter|vcf_convert|vcf_concat|vcf_mask|gatk_select_variants)$:
$ref: "#/definitions/rule.java.config"
^filter_(gatk_variant_JEXL_filtration|gatk_jexl_filter_variants)$:
$ref: "variantfilter.schema.yaml#/definitions/rule.java.gatk.filter.config"
^popoolation_(filter_pileup_by_gtf|gather_parallel_results)$:
$ref: "#/definitions/rule.config"
^popoolation2_(samtools_mpileup|indel_filtering_identify_indel_regions|gather_parallel_results|indel_filtering_filter_sync_by_gtf|indel_filtering_remove_indels|subsample_synchronized|snp_frequency_diff)$:
$ref: "#/definitions/rule.config"
^popoolation2_(mpileup2sync_jar)$:
$ref: "#/definitions/rule.java.config"
^popoolation2_(fst_sliding|fisher_test)$:
$ref: "#/definitions/rule.window.config"