EnsemblEnsembl Home

Variant Effect Predictor Running VEP

VEP is run on the command line as follows (assuming you are in the ensembl-vep directory):

 ./vep [options] 

where [options] represent a set of flags and options to the script. A basic set of flags can be listed using --help:

 ./vep --help 

Users should download a cache file for their species of interest, using either the installer script or by following the documentation, and run VEP with either the --cache or --offline option.

For smaller input files, it is possible for VEP to connect to Ensembl's public database servers in place of the cache; to enable this, use --database

Most users will need to use only a few of the options described below; for most the following command will be enough to get started with:

 ./vep --cache -i input.txt -o output.txt 

where input.txt contains data in one of the compatible input formats, and output.txt is the output file created by the script. See Data Formats for more detail on input and output formats.

Options can be passed as the full string (e.g. --format), or as the shortest unique string among the options (e.g. --form for --format, since there is another option --force_overwrite).

You may use one or two hypen ("-") characters before each option name; --cache or -cache.

Options can also be read from a configuration file - either passively stored as $HOME/.vep/vep.ini, or actively using --config.

Basic options

Flag Alternate Description
  Display help message and quit
Suppress warning messages. Not used by default
--config [filename]
  Load configuration options from a config file. The config file should consist of whitespace-separated pairs of option names and settings e.g.:
output_file   my_output.txt
species       mus_musculus
format        vcf
host          useastdb.ensembl.org
A config file can also be implicitly read; save the file as $HOME/.vep/vep.ini (or equivalent directory if using --dir). Any options in this file will be overridden by those specified in a config file using --config, and in turn by any options manually specified on the command line. You can create a quick version file of this by setting the flags as normal and running the script in verbose (-v) mode. This will output lines that can be copied to a config file that can be loaded in on the next run using --config. Not used by default
  Shortcut flag to switch on all of the following:

--sift b, --polyphen b, --ccds, --uniprot, --hgvs, --symbol, --numbers, --domains, --regulatory, --canonical, --protein, --biotype, --uniprot, --tsl, --appris, --gene_phenotype --af, --af_1kg, --af_esp, --af_gnomad, --max_af, --pubmed, --variant_class

--fork [num_forks]
  Enable forking, using the specified number of forks. Forking can dramatically improve the runtime of the script. Not used by default

Input options

Flag Alternate Description
--species [species]
  Species for your data. This can be the latin name e.g. "homo_sapiens" or any Ensembl alias e.g. "mouse". Specifying the latin name can speed up initial database connection as the registry does not have to load all available database aliases on the server. Default = "homo_sapiens"
--assembly [name]
Select the assembly version to use if more than one available. If using the cache, you must have the appropriate assembly's cache file installed. If not specified and you have only 1 assembly version installed, this will be chosen by default. Default = use found assembly version
--input_file [filename]
Input file name. If not specified, the script will attempt to read from STDIN.
--input_data [string]
Raw input data as a string. May be used, for example, to input a single rsID or HGVS notation quickly to vep: --input_data rs699.
--format [format]
  Input file format - one of "ensembl", "vcf", "hgvs", "id". By default, the script auto-detects the input file format. Using this option you can force the script to read the input file as Ensembl, VCF, IDs or HGVS. Auto-detects format by default
--output_file [filename]
Output file name. The script can write to STDOUT by specifying STDOUT as the output file name - this will force quiet mode. Default = "variant_effect_output.txt"
By default, the script will fail with an error if the output file already exists. You can force the overwrite of the existing file by using this flag. Not used by default
--stats_file [filename]
  Summary stats file name. This is an HTML file containing a summary of the VEP run - the file name must end ".htm" or ".html". Default = "variant_effect_output.txt_summary.html"
  Don't generate a stats file. Provides marginal gains in run time.
  Generate a plain text stats file in place of the HTML.
--warning_file [filename]
  File name to write warnings and errors to. Default = STDERR (standard error)

Cache options

Flag Alternate Description
  Enables use of the cache. Add --refseq or --merged to use the refseq or merged cache, (if installed).
--dir [directory]
  Specify the base cache/plugin directory to use. Default = "$HOME/.vep/"
--dir_cache [directory]
  Specify the cache directory to use. Default = "$HOME/.vep/"
--dir_plugins [directory]
  Specify the plugin directory to use. Default = "$HOME/.vep/"
  Enable offline mode. No database connections will be made, and a cache file or GFF/GTF file is required for annotation. Add --refseq to use the refseq cache (if installed). Not used by default
--fasta [file|dir]
  Specify a FASTA file or a directory containing FASTA files to use to look up reference sequence. The first time you run the script with this parameter an index will be built which can take a few minutes. This is required if fetching HGVS annotations (--hgvs) or checking reference sequences (--check_ref) in offline mode (--offline), and optional with some performance increase in cache mode (--cache). See documentation for more details. Not used by default

Specify this option if you have installed the RefSeq cache in order for VEP to pick up the alternate cache directory. This cache contains transcript objects corresponding to RefSeq transcripts (to include CCDS and Ensembl ESTs also, use --all_refseq). Consequence output will be given relative to these transcripts in place of the default Ensembl transcripts (see documentation)


Use the merged Ensembl and RefSeq cache. Consequences are flagged with the SOURCE of each transcript used.

  Use a different cache version than the assumed default (the VEP version). This should be used with Ensembl Genomes caches since their version numbers do not match Ensembl versions. For example, the VEP/Ensembl version may be 88 and the Ensembl Genomes version 35. Not used by default
  Show source version information for selected cache and quit
--buffer_size [number]
  Sets the internal buffer size, corresponding to the number of variants that are read in to memory simultaneously. Set this lower to use less memory at the expense of longer run time, and higher to use more memory with a faster run time. Default = 5000

Other annotation sources

Flag Alternate Description
--plugin [plugin name]
  Use named plugin. Plugin modules should be installed in the Plugins subdirectory of the VEP cache directory (defaults to $HOME/.vep/). Multiple plugins can be used by supplying the --plugin flag multiple times. See plugin documentation. Not used by default
--custom [filename]
  Add custom annotation to the output. Files must be tabix indexed or in the bigWig format. Multiple files can be specified by supplying the --custom flag multiple times. See here for full details. Not used by default
--gff [filename]
  Use GFF transcript annotations in [filename] as an annotation source. Requires a FASTA file of genomic sequence.Not used by default
--gtf [filename]
  Use GTF transcript annotations in [filename] as an annotation source. Requires a FASTA file of genomic sequence.Not used by default
--bam [filename]
  ADVANCED Use BAM file of sequence alignments to correct transcript models not derived from reference genome sequence. Used to correct RefSeq transcript models. Enables --use_transcript_ref; add --use_given_ref to override this behaviour. Not used by default
  By default VEP uses the reference allele provided in the user input to calculate consequences for the provided alternate allele(s). Use this flag to force VEP to replace the user-provided reference allele with sequence derived from the overlapped transcript. This is especially relevant when using the RefSeq cache, see documentation for more details. The GIVEN_REF and USED_REF fields are set in the output to indicate any change. Not used by default
  Using --bam or a BAM-edited RefSeq cache by default enables --use_transcript_ref; add this flag to override this behaviour and use the user-provided reference allele from the input. Not used by default

Output options

Flag Alternate Description
  Output the Sequence Ontology variant class. Not used by default
--sift [p|s|b]
  Species limited SIFT predicts whether an amino acid substitution affects protein function based on sequence homology and the physical properties of amino acids. VEP can output the prediction term, score or both. Not used by default
--polyphen [p|s|b]
Human only PolyPhen is a tool which predicts possible impact of an amino acid substitution on the structure and function of a human protein using straightforward physical and comparative considerations. VEP can output the prediction term, score or both. VEP uses the humVar score by default - use --humdiv to retrieve the humDiv score. Not used by default
  Human only Retrieve the humDiv PolyPhen prediction instead of the default humVar. Not used by default
--nearest [transcript|gene|symbol]

Retrieve the transcript or gene with the nearest protein-coding transcription start site (TSS) to each input variant. Use "transcript" to retrieve the transcript stable ID, "gene" to retrieve the gene stable ID, or "symbol" to retrieve the gene symbol. Note that the nearest TSS may not belong to a transcript that overlaps the input variant, and more than one may be reported in the case where two are equidistant from the input coordinates.

Currently only available when using a cache annotation source, and requires the Set::IntervalTree perl module.

Not used by default
--distance [bp_distance(,downstream_distance_if_different)]
  Modify the distance up and/or downstream between a variant and a transcript for which VEP will assign the upstream_gene_variant or downstream_gene_variant consequences. Giving one distance will modify both up- and downstream distances; prodiving two separated by commas will set the up- (5') and down- (3') stream distances respectively. Default: 5000
  Indicates if the overlapped gene is associated with a phenotype, disease or trait. See list of phenotype sources. Not used by default
  Look for overlaps with regulatory regions. The script can also call if a variant falls in a high information position within a transcription factor binding site. Output lines have a Feature type of RegulatoryFeature or MotifFeature. Not used by default
  Report only regulatory regions that are found in the given cell type(s). Can be a single cell type or a comma-separated list. The functional type in each cell type is reported under CELL_TYPE in the output. To retrieve a list of cell types, use --cell_type list. Not used by default
--individual [all|ind list]
  Consider only alternate alleles present in the genotypes of the specified individual(s). May be a single individual, a comma-separated list or "all" to assess all individuals separately. Individual variant combinations homozygous for the given reference allele will not be reported. Each individual and variant combination is given on a separate line of output. Only works with VCF files containing individual genotype data; individual IDs are taken from column headers. Not used by default
  Force VCF genotypes to be interpreted as phased. For use with plugins that depend on phased data. Not used by default
  Identify allele number from VCF input, where 1 = first ALT allele, 2 = second ALT allele etc. Useful when using --minimal Not used by default
  Give cDNA, CDS and protein positions as Position/Length. Not used by default
  Adds affected exon and intron numbering to to output. Format is Number/Total. Not used by default
  Adds names of overlapping protein domains to output. Not used by default
  Don't URI escape HGVS strings. Default = escape
  Don't overwrite existing CSQ entry in VCF INFO field. Overwrites by default
--vcf_info_field [CSQ|ANN|(other)]
  Change the name of the INFO key that VEP write the consequences to in its VCF output. Use "ANN" for compatibility with other tools such as snpEff. Default: CSQ
--terms [ensembl|so]
The type of consequence terms to output. The Ensembl terms are described here. The Sequence Ontology is a joint effort by genome annotation centres to standardise descriptions of biological sequences. Default = "SO"
  Don't write header lines in output files. Default = add headers


Flag Alternate Description
  Add HGVS nomenclature based on Ensembl stable identifiers to the output. Both coding and protein sequence names are added where appropriate. To generate HGVS identifiers when using --cache or --offline you must use a FASTA file and --fasta. HGVS notations given on Ensembl identifiers are versioned. Not used by default
  Add genomic HGVS nomenclature based on the input chromosome name. To generate HGVS identifiers when using --cache or --offline you must use a FASTA file and --fasta. Not used by default
--shift_hgvs [0|1]
  Enable or disable 3' shifting of HGVS notations. When enabled, this causes ambiguous insertions or deletions (typically in repetetive sequence tracts) to be "shifted" to their most 3' possible coordinates (relative to the transcript sequence and strand) before the HGVS notations are calculated; the flag HGVS_OFFSET is set to the number of bases by which the variant has shifted, relative to the input genomic coordinates. Disabling retains the original input coordinates of the variant. Default: 1 (shift)
  Add the Ensembl protein identifier to the output where appropriate. Not used by default
  Adds the gene symbol (e.g. HGNC) (where available) to the output. Not used by default
  Adds the CCDS transcript identifer (where available) to the output. Not used by default
  Adds best match accessions for translated protein products from three UniProt-related databases (SWISSPROT, TREMBL and UniParc) to the output. Not used by default
  Adds the transcript support level for this transcript to the output. NB: not available for GRCh37.Not used by default
  Adds the APPRIS isoform annotation for this transcript to the output. NB: not available for GRCh37.Not used by default
  Adds a flag indicating if the transcript is the canonical transcript for the gene. Not used by default
  Adds the biotype of the transcript or regulatory feature. Not used by default
  Output aligned RefSeq mRNA identifier for transcript. NB: theRefSeq and Ensembl transcripts aligned in this way MAY NOT, AND FREQUENTLY WILL NOT, match exactly in sequence, exon structure and protein product. Not used by default
--synonyms [file]
  Load a file of chromosome synonyms. File should be tab-delimited with the primary identifier in column 1 and the synonym in column 2. Synonyms are used bi-directionally so columns may be switched. Synoyms allow different chromosome identifiers to be used in the input file and any annotation source (cache, database, GFF, custom file, FASTA file). Not used by default

Co-located variants

Flag Alternate Description
  Checks for the existence of known variants that are co-located with your input. By default the alleles are compared and variants on an allele-specific basis - to compare only coordinates, use --no_check_alleles.

Some databases may contain variants with unknown (null) alleles and these are included by default; to exclude them use --exclude_null_alleles.

See this page for more details.

Not used by default
  Do not include variants with unknown alleles when checking for co-located variants. The human variation database contains variants from HGMD and COSMIC for which the alleles are not publically available; by default these are included when using --check_existing, use this flag to exclude them. Not used by default
  When checking for existing variants, by default VEP only reports a co-located variant if none of the input alleles are novel. For example, if the user input has alleles A/G, and an existing co-located variant has alleles A/C, the co-located variant will not be reported.

Strand is also taken into account - in the same example, if the user input has alleles T/G but on the negative strand, then the co-located variant will be reported since its alleles match the reverse complement of user input.

Use this flag to disable this behaviour and compare using coordinates alone. Not used by default
  Add the global allele frequency (AF) from 1000 Genomes Phase 3 data for any known co-located variant to the output. For this and all --af_* flags, the frequency reported is for the input allele only, not necessarily the non-reference or derived allele. Supercedes --gmaf.Not used by default
  Report the highest allele frequency observed in any population from 1000 genomes, ESP or gnomAD. Not used by default
  Add allele frequency from continental populations (AFR,AMR,EAS,EUR,SAS) of 1000 Genomes Phase 3 to the output. Must be used with --cache. Supercedes --maf_1kg. Not used by default
  Include allele frequency from NHLBI-ESP populations. Must be used with --cache. Supercedes --maf_esp. Not used by default
  Include allele frequency from Genome Aggregation Database (gnomAD) exome populations. Note only data from the gnomAD exomes are included; to retrieve data from the additional genomes data set, see this guide. Must be used with --cache Not used by default
  NB: ExAC data has been superceded by gnomAD. This flag remains for users wishing to user older cache versions containing ExAC data. Include allele frequency from ExAC project populations. Must be used with --cache. Superceded --maf_exac. Not used by default
  Report Pubmed IDs for publications that cite existing variant. Must be used with --cache. Not used by default
--failed [0|1]
  When checking for co-located variants, by default the script will exclude variants that have been flagged as failed. Set this flag to include such variants. Default: 0 (exclude)

Data format options

Flag Alternate Description
  Writes output in VCF format. Consequences are added in the INFO field of the VCF file, using the key "CSQ". Data fields are encoded separated by "|"; the order of fields is written in the VCF header. Output fields can be selected by using --fields.

If the input format was VCF, the file will remain unchanged save for the addition of the CSQ field (unless using any filtering).

Custom data added with --custom are added as separate fields, using the key specified for each data file.

Commas in fields are replaced with ampersands (&) to preserve VCF format.

Not used by default
  Writes output in tab-delimited format. Not used by default
  Writes output in JSON format. Not used by default
--compress_output [gzip|bgzip]
  Writes output compressed using either gzip or bgzip. Not used by default
--fields [list]
  Configure the output format using a comma separated list of fields. Fields may be those present in the default output columns, or any of those that appear in the Extra column (including those added by plugins or custom annotations). Output remains tab-delimited. Can only be used with tab or VCF format output. Not used by default
  Convert alleles to their most minimal representation before consequence calculation i.e. sequence that is identical between each pair of reference and alternate alleles is trimmed off from both ends, with coordinates adjusted accordingly. Note this may lead to discrepancies between input coordinates and coordinates reported by VEP relative to transcript sequences; to avoid issues, use --allele_number and/or ensure that your input variants have unique identifiers. The MINIMISED flag is set in the VEP output where relevant. Not used by default

Filtering and QC options

NOTE: The filtering options here filter your results before they are written to your output file. Using VEP's filtering script, it is possible to filter your results after VEP has run. This way you can retain all of the results and run multiple filter sets on the same results to find different data of interest.

Flag Alternate Description
  Limit your analysis to transcripts belonging to the GENCODE basic set. This set has fragmented or problematic transcripts removed. Not used by default
  When using the RefSeq or merged cache, include e.g. CCDS and Ensembl EST transcripts in addition to those from RefSeq (see documentation). Only works when using --refseq or --merged
  When using the RefSeq or merged cache, exclude predicted transcripts (i.e. those with identifiers beginning with "XM_" or "XR_").

ADVANCED Filter transcripts according to any arbitrary set of rules. Uses similar notation to filter_vep.

You may filter on any key defined in the root of the transcript object; most commonly this will be "stable_id":

--transcript_filter "stable_id match N[MR]_"
  Force the script to check the supplied reference allele against the sequence stored in the Ensembl Core database or supplied FASTA file. Lines that do not match are skipped. Not used by default
  Don't skip input variants that fail validation, e.g. those that fall on unrecognised sequences
  When using VCF format as input and output, by default VEP will skip non-variant lines of input (where the ALT allele is null). Enabling this option the lines will be printed in the VCF output with no consequence data added.
--chr [list]
  Select a subset of chromosomes to analyse from your file. Any data not on this chromosome in the input will be skipped. The list can be comma separated, with "-" characters representing an interval. For example, to include chromosomes 1, 2, 3, 10 and X you could use --chr 1-3,10,X Not used by default
  Only return consequences that fall in the coding regions of transcripts. Not used by default
  Do not include intergenic consequences in the output. Not used by default
  Pick once line or block of consequence data per variant, including transcript-specific columns. Consequences are chosen according to the criteria described here, and the order the criteria are applied may be customised with --pick_order. This is the best method to use if you are interested only in one consequence per variant. Not used by default
  Like --pick, but chooses one line or block of consequence data per variant allele. Will only differ in behaviour from --pick when the input variant has multiple alternate alleles. Not used by default
  Output only the most severe consequence per gene. The transcript selected is arbitrary if more than one has the same predicted consequence. Uses the same ranking system as --pick. Not used by default
  Like --pick_allele, but chooses one line or block of consequence data per variant allele and gene combination. Not used by default
  As per --pick, but adds the PICK flag to the chosen block of consequence data and retains others. Not used by default
  As per --pick_allele, but adds the PICK flag to the chosen block of consequence data and retains others. Not used by default
  As per --pick_allele_gene, but adds the PICK flag to the chosen block of consequence data and retains others. Not used by default
--pick_order [c1,c2,...,cN]
  Customise the order of criteria applied when choosing a block of annotation data with e.g. --pick. See this page for the default order. Valid criteria are: canonical,appris,tsl,biotype,ccds,rank,length
  Output only the most severe consequence per variant. Transcript-specific columns will be left blank. Consequence ranks are given in this table. Not used by default
  Output only a comma-separated list of all observed consequences per variant. Transcript-specific columns will be left blank. Not used by default
  Shortcut flag for the filters below - this will exclude variants that have a co-located existing variant with global AF > 0.01 (1%). May be modified using any of the following freq_* filters. Not used by default
  Turns on frequency filtering. Use this to include or exclude variants based on the frequency of co-located existing variants in the Ensembl Variation database. You must also specify all of the --freq_* flags below. Frequencies used in filtering are added to the output under the FREQS key in the Extra field. Not used by default
--freq_pop [pop]
  Name of the population to use in frequency filter. This must be one of the following:

1KG_ALL1000 genomes combined population (global)
1KG_AFR1000 genomes combined African population
1KG_AMR1000 genomes combined American population
1KG_EAS1000 genomes combined East Asian population
1KG_EUR1000 genomes combined European population
1KG_SAS1000 genomes combined South Asian population
ESP_AANHLBI-ESP African American
ESP_EANHLBI-ESP European American
ExACExAC combined population
ExAC_AdjExAC combined adjusted population
ExAC_AFRExAC African
ExAC_AMRExAC American
ExAC_EASExAC East Asian
ExAC_FINExAC Finnish
ExAC_NFEExAC non-Finnish European
ExAC_SASExAC South Asian
ExAC_OTHExAC other

--freq_freq [freq]
  Allele frequency to use for filtering. Must be a float value between 0 and 1
--freq_gt_lt [gt|lt]
  Specify whether the frequency of the co-located variant must be greater than (gt) or less than (lt) the value specified with --freq_freq
--freq_filter [exclude|include]
  Specify whether to exclude or include only variants that pass the frequency filter

Database options

Flag Alternate Description
  Enable VEP to use local or remote databases.
--host [hostname]
  Manually define the database host to connect to. Users in the US may find connection and transfer speeds quicker using our East coast mirror, useastdb.ensembl.org. Default = "ensembldb.ensembl.org"
--user [username]
Manually define the database username. Default = "anonymous"
--password [password]
Manually define the database password. Not used by default
--port [number]
  Manually define the database port. Default = 5306
  Override the default connection settings with those for the Ensembl Genomes public MySQL server. Required when using any of the Ensembl Genomes species. Not used by default
  Map input variants to LRG coordinates (or to chromosome coordinates if given in LRG coordinates), and provide consequences on both LRG and chromosomal transcripts. Not compatible with --offline
  Checks for the existence of structural variants that overlap your input. Currently requires database access (i.e. not compatible with --offline). Not used by default
--db_version [number]
Force the script to connect to a specific version of the Ensembl databases. Not recommended as there may be conflicts between software and database versions. Not used by default
--registry [filename]
  Defining a registry file overwrites other connection settings and uses those found in the specified registry file to connect. Not used by default