Skip to content

Annotations

Step 8 annotates the called variants with what they do to genes — missense, synonymous, intergenic — using SnpEff against a database built from your GFF back in step 1. The annotation is a parallel branch, not a filter: it never changes the frequency tables, and nothing downstream depends on it.

Parameter Default What it is
annotate true Whether step 8 runs. false also stops step 1 building the database, and makes gffFile unnecessary
gffFile 'reference.gff.gz' Your annotation file, in mainDir/Reference beside the reference. Gzipped is accepted
snpEff.config "snpEff.config" Name of the SnpEff configuration file the build writes and the run reads
snpEff.buildOptions -gff3 -noCheckCds -noCheckProtein -v Passed to snpEff build in step 1
snpEff.runOptions -v Passed to snpEff in step 8

snpEff.db is computed from gffFile — the same name with .gz removed — and names the database SnpEff builds and then annotates against. Change gffFile, not this.

annotate is a per-run parameter, so a run table may switch annotation on for some runs and off for others; step 1 builds the database only for the runs that asked for it.

The two option strings

The snpEff defaults are not arbitrary, and the build ones in particular are worth understanding before you change them.

buildOptions says the annotation file is GFF3 and turns off two consistency checks SnpEff runs by default: that every CDS translates to the protein SnpEff expects, and that protein sequences match. Non-model references routinely fail both — a GFF with slightly different coordinates, a genome with a non-standard genetic code — and the failure aborts the build rather than degrading it. They are off so that a usable database is built from an imperfect annotation, which is the normal case here. Turn them back on by removing the flags if you want the check.

runOptions is verbosity only. Both are plain strings passed straight through, so anything snpEff accepts can go in them:

snpEff {
    buildOptions = "-gff3 -v"          // put the CDS and protein checks back
    runOptions   = "-v -no-downstream" // drop downstream-gene annotations
}

Changing either changes what step 8 writes, so step 0 tracks them and refuses a run that disagrees with existing results.

What you get, and what it is not joined to

Output is Output/VCF/<name>_annotated.vcf, Output/Reports/snpeff_summary.html and Output/Reports/snpeff_summary.genes.txt.

The annotated VCF is not your frequency tables with a column added. Step 8 reads step 6's output, so it carries sites the step 7 filters removed and encodes them against the original reference rather than the major allele. Joining the two is yours to do, on CHROM/POS, expecting unmatched rows on the annotation side — see Step 8.