ANNOVAR Functional Annotation Tool

repository·master·Indexed 42 days ago

https://github.com/wglab/doc-annovar

A 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.

Tokens
45.9K
Snippets
125
Records
186
Agent score
49%

What's inside ANNOVAR

  1. Overview of ANNOVAR

    master
    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.
  2. Overview of ANNOVAR annotation capabilities

    master

    ANNOVAR 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:

    1. 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.
    2. 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.).
    3. 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).
    4. Other functionalities: Batch retrieval of nucleotide sequences at specific genomic positions and identification of candidate gene lists for Mendelian diseases.
  3. How table_annovar.pl operations work

    master

    The -operation argument defines how ANNOVAR processes each protocol specified in the -protocol list. 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 -xref argument).
    • r: Region-based annotation.
    • f: Filter-based annotation.

    Example mapping: if -protocol is refGeneWithVer,cytoBand and -operation is g,r, then refGeneWithVer uses gene-based logic and cytoBand uses region-based logic.

  4. Format the ANNOVAR input file

    master

    The annotate_variation.pl program 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:

    1. Chromosome: The chromosome name (the chr prefix is optional).
    2. Start: The starting position.
    3. End: The ending position.
    4. Reference Allele: The reference nucleotides.
    5. 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 0 to fill in the reference or alternative nucleotide columns if the information is unavailable. Note that using 0 for 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 --outfile argument).
    1 948921 948921 T C comments: rs15842
    1 13211293 13211294 TC -
    1 11403596 11403596 - AT
    1 105492231 105492231 A ATAAA
  5. Specify the correct genome build for ANNOVAR

    master

    By default, ANNOVAR annotates variants on the hg18 (NCBI build 36) coordinate system. You must explicitly specify the correct build using the -buildver flag 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).
  6. Understand VCF format complications in ANNOVAR

    master

    When 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.pl is designed to handle multiple alleles in the INFO field 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 -> CTTA instead of T -> 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 INFO field if the software cannot correctly re-distribute allele-specific metadata (like allele counts) to the new individual lines. If you must preserve complex INFO field data, consider re-joining variants at the same locus after processing.
  7. Downstream analysis of exome VCF annotation

    master

    Once 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.
  8. Handle mitochondrial (M) chromosomes in ANNOVAR

    master
    When processing mitochondrial data where the chromosome is labeled "M", ANNOVAR may not print hom or het. 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 -chrmt argument to specify it.
  9. Understand ANNOVAR's strict dbSNP matching logic

    master

    Unlike 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 avsnp or performing left-normalization.
  10. Understand ANNOVAR gene annotation output files

    master

    When performing gene-based annotation, ANNOVAR typically produces two primary output files:

    1. [output_prefix].variant_function: Provides a general overview of the variant's impact, including functional classifications like UTR5, UTR3, splicing, intronic, intergenic, and exonic. It includes the gene name (or CCDS ID), transcript ID, and genomic coordinates.
    2. [output_prefix].exonic_variant_function: Provides detailed information specifically for variants located in exonic regions, such as nonsynonymous SNV, frameshift insertion, or frameshift deletion, including the specific amino acid changes (e.g., p.R126Q).