VCF Info Annotator

The VCF Info Annotator will add data form a tab-delimited (TSV) file to a VCF’s INFO column.

The TSV file needs to contain three columns in the following order:

  • chromosome

  • position

  • the value for your field at that position

To define the new INFO field you need to specify a info field name in the positional parameters. This term will be used as the ID field in the INFO header. You will also need to specify a description in quotes that will be used as the Description field in the INFO header. Lastly, you will need to specify the format of your data. This can be either be Integer, Float, Flag, Character, or String.

Optional, you can also set the Source and Version fields of the INFO header using the --source and --version parameters, respectively.

By default the output VCF will be written to a .info.vcf file next to your input VCF file. You can set a different output file using the --output-vcf parameter.

Usage

usage: vcf-info-annotator [-h] [-d DESCRIPTION]
                          [-f {Integer,Float,Flag,Character,String}]
                          [-o OUTPUT_VCF] [-s SOURCE] [-w] [-v VERSION]
                          input_vcf values_file info_field

A tool that will add data from a tab-delimited file to any user-specified
field in the VCF INFO column.

positional arguments:
  input_vcf             A VCF file
  values_file           A TSV file containing three columns: chromosome,
                        position, value
  info_field            The INFO field name to use

optional arguments:
  -h, --help            show this help message and exit
  -d DESCRIPTION, --description DESCRIPTION
                        The description of the INFO field to add to the header
  -f {Integer,Float,Flag,Character,String}, --value_format {Integer,Float,Flag,Character,String}
                        The format of the values to be placed into the info
                        field.
  -o OUTPUT_VCF, --output-vcf OUTPUT_VCF
                        Path to write the output VCF file. If not provided,
                        the output VCF file will be written next to the input
                        VCF file with a .info.vcf file ending.
  -s SOURCE, --source SOURCE
                        The string to put in the "source" section of the INFO
                        header line - optional
  -w, --overwrite       by default, ths tool will raise an exception if the
                        field specified already exists in the VCF. This flag
                        allows existing fields to be overwritten.
  -v VERSION, --version VERSION
                        The string to put in the "version" section of the INFO
                        header line - optional