Skip to content

Commit 981165c

Browse files
committed
Add instructions of SnpEff config fields
Also updates the order in the configuration file
1 parent c1d4c17 commit 981165c

2 files changed

Lines changed: 37 additions & 31 deletions

File tree

config/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,12 @@ All of the following variables are pre-defined in [config.yaml](/config/config.y
180180
After `INCLUDE` is applied, any feature that matches any key/value pair in `EXCLUDE`
181181
is omitted. For example, having `EXCLUDE: {gene: [S, N]}` removes features whose
182182
`gene` qualifier equals `S` or `N`.
183+
- `ANNOTATION`: settings for variant annotation and functional effect prediction using [SnpEff](https://pcingola.github.io/SnpEff/), which uses `ALIGNMENT_REFERENCE` for selecting the database to annotate.
184+
- `SNPEFF_COLS`: mapping of column names (which appear in result tables) to VCF fields (extracted after annotation with [SnpSift](https://pcingola.github.io/SnpEff/#snpsift)). Some columns are hard-coded in the code, so removing them is not advised. Additional columns can be added as needed.
185+
- `FILTER_INCLUDE` & `FILTER_EXCLUDE`: mapping of column names (from `SNPEFF_COLS`) to lists of values used for filtering the annotated variants table. `FILTER_INCLUDE` is applied first, then `FILTER_EXCLUDE`.
186+
- `FILTER_INCLUDE`: keeps variants that match at least one listed value.
187+
- `FILTER_EXCLUDE`: removes variant that matches any listed value.
188+
- `VARIANT_NAME_PATTERN`: string template used to build the variant name shown in the results table (column `VARIANT_NAME`). The template is interpreted with [glue](https://glue.tidyverse.org/) and can use any column name from `SNPEFF_COLS` and some R functions. For example, `"{GENE}:{coalesce(HGVS_P, HGVS_C)}"` creates names like `S:p.D614G` (using `HGVS_P` when available, otherwise `HGVS_C`).
183189
- `GISAID`: automatic context download configuration.
184190
- `CREDENTIALS`: path of the GISAID credentials in YAML format.
185191
- `DATE_COLUMN`: name of the column that contains sampling dates (YYYY-MM-DD) in the input target metadata.

config/config.yaml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,37 +17,6 @@ VC:
1717
MIN_FREQ: 0.05
1818
MIN_DEPTH: 30
1919
MAX_DEPTH: 1000000
20-
ANNOTATION:
21-
# see: https://pcingola.github.io/SnpEff/adds/VCFannotationformat_v1.0.pdf
22-
SNPEFF_COLS:
23-
CHROM: CHROM
24-
POS: POS
25-
REF: REF
26-
ALT: ALT
27-
EFFECT: "ANN[*].EFFECT" # hard-coded column
28-
IMPACT: "ANN[*].IMPACT" # hard-coded column
29-
BIOTYPE: "ANN[*].BIOTYPE"
30-
GENE: "ANN[*].GENE" # hard-coded column
31-
GENEID: "ANN[*].GENEID"
32-
FEATURE: "ANN[*].FEATURE"
33-
FEATUREID: "ANN[*].FEATUREID"
34-
HGVS_P: "ANN[*].HGVS_P" # hard-coded column
35-
HGVS_C: "ANN[*].HGVS_C" # hard-coded column
36-
ERRORS: "ANN[*].ERRORS" # hard-coded column
37-
FILTER_INCLUDE:
38-
# IMPACT: [HIGH, MODERATE, LOW]
39-
FILTER_EXCLUDE:
40-
EFFECT: [upstream_gene_variant, downstream_gene_variant]
41-
ERRORS:
42-
- ERROR_CHROMOSOME_NOT_FOUND
43-
- ERROR_OUT_OF_CHROMOSOME_RANGE
44-
- WARNING_REF_DOES_NOT_MATCH_GENOME
45-
- WARNING_SEQUENCE_NOT_AVAILABLE
46-
- WARNING_TRANSCRIPT_INCOMPLETE
47-
- WARNING_TRANSCRIPT_MULTIPLE_STOP_CODONS
48-
- WARNING_TRANSCRIPT_NO_START_CODON
49-
- WARNING_TRANSCRIPT_NO_STOP_CODON
50-
VARIANT_NAME_PATTERN: "{GENE}:{coalesce(HGVS_P, HGVS_C)}" # dplyr's coalesce finds the first non-missing element
5120
DEMIX:
5221
PATHOGEN: "SARS-CoV-2"
5322
MIN_QUALITY: 20
@@ -78,6 +47,37 @@ GB_FEATURES:
7847
- "nucleocapsid phosphoprotein"
7948
- "ORF10 protein"
8049
# EXCLUDE: ... # all
50+
ANNOTATION:
51+
# see: https://pcingola.github.io/SnpEff/adds/VCFannotationformat_v1.0.pdf
52+
SNPEFF_COLS:
53+
CHROM: CHROM
54+
POS: POS
55+
REF: REF
56+
ALT: ALT
57+
EFFECT: "ANN[*].EFFECT"
58+
IMPACT: "ANN[*].IMPACT"
59+
BIOTYPE: "ANN[*].BIOTYPE"
60+
GENE: "ANN[*].GENE"
61+
GENEID: "ANN[*].GENEID"
62+
FEATURE: "ANN[*].FEATURE"
63+
FEATUREID: "ANN[*].FEATUREID"
64+
HGVS_P: "ANN[*].HGVS_P"
65+
HGVS_C: "ANN[*].HGVS_C"
66+
ERRORS: "ANN[*].ERRORS"
67+
FILTER_INCLUDE:
68+
# IMPACT: [HIGH, MODERATE, LOW]
69+
FILTER_EXCLUDE:
70+
EFFECT: [upstream_gene_variant, downstream_gene_variant]
71+
ERRORS:
72+
- ERROR_CHROMOSOME_NOT_FOUND
73+
- ERROR_OUT_OF_CHROMOSOME_RANGE
74+
- WARNING_REF_DOES_NOT_MATCH_GENOME
75+
- WARNING_SEQUENCE_NOT_AVAILABLE
76+
- WARNING_TRANSCRIPT_INCOMPLETE
77+
- WARNING_TRANSCRIPT_MULTIPLE_STOP_CODONS
78+
- WARNING_TRANSCRIPT_NO_START_CODON
79+
- WARNING_TRANSCRIPT_NO_STOP_CODON
80+
VARIANT_NAME_PATTERN: "{GENE}:{coalesce(HGVS_P, HGVS_C)}"
8181
GISAID:
8282
CREDENTIALS: "config/gisaid.yaml"
8383
DATE_COLUMN: "CollectionDate"

0 commit comments

Comments
 (0)