ANNOVAR Functional Annotation Tool
repository·master·Indexed 42 days ago
https://github.com/wglab/doc-annovarA software tool for the functional annotation of genetic variants from next-generation sequencing data across various species and genome builds (including human hg18, hg19, hg38). It provides gene-based, region-based, and filter-based annotations, utilizing tools like table_annovar.pl for automated tasks and supporting normalized databases such as avsnp138 and avsnp142. The documentation also covers wANNOVAR, a web-based version supporting VCF, TSV, and GFF3 formats with Phenolyzer integration for disease-specific prioritization.
What's inside ANNOVAR
- ANNOVAR is an efficient software tool designed for the functional annotation of genetic variants. It utilizes up-to-date information to annotate variants detected from diverse genomes, including human (hg18, hg19, hg38), mouse, worm, fly, yeast, and many others.
Overview of ANNOVAR annotation capabilities
masterANNOVAR is a software tool used to functionally annotate genetic variants across diverse genomes (including human hg18, hg19, hg38, hs1/T2T-CHM13, mouse, worm, fly, yeast, SARS-CoV-2, and more).
It provides four primary types of annotation:
- Gene-based annotation: Identifies if SNPs or CNVs cause protein-coding changes and identifies affected amino acids. Supports RefSeq, UCSC, Ensembl/Gencode, or custom gene definitions.
- Region-based annotation: Identifies variants in specific genomic intervals (e.g., conserved regions, transcription factor binding sites, ENCODE sites, ChIP-Seq/RNA-Seq peaks, etc.).
- Filter-based annotation: Identifies variants documented in specific databases (e.g., dbSNP, allele frequencies in 1000 Genome/gnomAD, SIFT/PolyPhen scores, ClinVar pathogenicity, or COSMIC somatic mutations).
- Other functionalities: Batch retrieval of nucleotide sequences at specific genomic positions and identification of candidate gene lists for Mendelian diseases.
How table_annovar.pl operations work
masterThe
-operationargument defines how ANNOVAR processes each protocol specified in the-protocollist. The number of operations provided must match the number of protocols.Common operation types:
g: Gene-based annotation.gx: Gene-based annotation with cross-reference (requires the-xrefargument).r: Region-based annotation.f: Filter-based annotation.
Example mapping: if
-protocolisrefGeneWithVer,cytoBandand-operationisg,r, thenrefGeneWithVeruses gene-based logic andcytoBanduses region-based logic.Format the ANNOVAR input file
masterThe
annotate_variation.plprogram requires a specific text-based format where each line represents one variant. The file must use a 1-based coordinate system.Each line must contain at least the first five space- or tab-delimited columns:
- Chromosome: The chromosome name (the
chrprefix is optional). - Start: The starting position.
- End: The ending position.
- Reference Allele: The reference nucleotides.
- Alternative Allele: The observed nucleotides.
Additional columns can be appended to the line; these will be printed out in the output in the same format.
Handling Special Cases:
- Missing Nucleotides: Use
0to fill in the reference or alternative nucleotide columns if the information is unavailable. Note that using0for nucleotides means ANNOVAR cannot determine amino acid changes. - Indels and Substitutions: Use a dash (
–) to represent a null nucleotide for insertions, deletions, or block substitutions. - Invalid Lines: If the program encounters an invalid line, it will write it to a file named
<outfile>.invalid_input(where<outfile>is the name provided via the--outfileargument).
1 948921 948921 T C comments: rs15842 1 13211293 13211294 TC - 1 11403596 11403596 - AT 1 105492231 105492231 A ATAAA- Chromosome: The chromosome name (the
Specify the correct genome build for ANNOVAR
masterBy default, ANNOVAR annotates variants on the hg18 (NCBI build 36) coordinate system. You must explicitly specify the correct build using the
-buildverflag to match your input VCF file to ensure accurate results.Common build flags:
hg19: For human genome build 19.hg38: For human genome build 38 (GRCh38).dm3: For Drosophila (fly).mm9: For Mus musculus (mouse).
Understand VCF format complications in ANNOVAR
masterWhen using ANNOVAR with VCF files, be aware of several structural characteristics that can affect annotation accuracy:
- Locus vs. Variant: VCF describes a locus. A single line can contain multiple alternative alleles (multi-allelic) or multiple variants (e.g., an SNV and an indel at the same position). ANNOVAR's
table_annovar.plis designed to handle multiple alleles in theINFOfield correctly, but splitting them into single-variant lines is preferred for database matching. - Variant Hijacking: Complex descriptors in VCF can turn a simple SNV into a multi-nucleotide variant (e.g.,
CTTT -> CTTAinstead ofT -> A). This prevents matching against databases that store the simpler version. Left-normalization resolves this. - INFO Field Integrity: Splitting and normalizing VCF lines can sometimes corrupt the
INFOfield if the software cannot correctly re-distribute allele-specific metadata (like allele counts) to the new individual lines. If you must preserve complexINFOfield data, consider re-joining variants at the same locus after processing.
- Locus vs. Variant: VCF describes a locus. A single line can contain multiple alternative alleles (multi-allelic) or multiple variants (e.g., an SNV and an indel at the same position). ANNOVAR's
Use the T2T genome build (hs1) for annotation
masterANNOVAR supports using the Telomere-to-Telomere (T2T) genome build, referred to ashs1, for performing annotations.Downstream analysis of exome VCF annotation
masterOnce VCF files are annotated, you can perform various downstream analyses to interpret the biological significance of variants. Common analyses include:
- Chromosome distribution: Analyzing how variants are spread across chromosomes.
- Variant type distribution: Examining the frequency of different mutation types (e.g., nonsynonymous, synonymous, intronic).
- Pathogenicity assessment: Using ClinVar data to determine if variants are likely to cause disease.
- Predictive scoring: Utilizing scores such as CADD, MetaRNN, or AlphaMissense to predict variant impact.
Handle mitochondrial (M) chromosomes in ANNOVAR
masterWhen processing mitochondrial data where the chromosome is labeled "M", ANNOVAR may not printhomorhet. Instead, it prints a fraction (0 to 1) representing the reads supporting the alternative allele. If your alignment uses a different identifier for mitochondria, use the-chrmtargument to specify it.Understand ANNOVAR's strict dbSNP matching logic
masterUnlike some tools that assign an rs ID based solely on position overlap, ANNOVAR's filter-based annotation requires an exact match of both the position and the nucleotide identity.
Implications:
- If a user finds a mutation (e.g.,
chr7:87509329 A->C) that differs from the dbSNP record (e.g.,chr7:87509329 A->G), ANNOVAR will not assign the rs ID. - This strictness is maintained to ensure the identifiability of allele frequencies and functional scores.
- For indels, this strictness often results in failed matches unless using normalized databases like
avsnpor performing left-normalization.
- If a user finds a mutation (e.g.,
Create customized ANNOVAR databases for filter-based operations
masterYou can create customized ANNOVAR databases to support specific filtering needs. An example use case is creating GTEX_v8_eQTL and GTEX_v8_sQTL databases to study tissue-specific gene regulation of variants.Understand ANNOVAR gene annotation output files
masterWhen performing gene-based annotation, ANNOVAR typically produces two primary output files:
[output_prefix].variant_function: Provides a general overview of the variant's impact, including functional classifications likeUTR5,UTR3,splicing,intronic,intergenic, andexonic. It includes the gene name (or CCDS ID), transcript ID, and genomic coordinates.[output_prefix].exonic_variant_function: Provides detailed information specifically for variants located in exonic regions, such asnonsynonymous SNV,frameshift insertion, orframeshift deletion, including the specific amino acid changes (e.g.,p.R126Q).