VEPParam objects

Share:

Description

VEPParam is a VIRTUAL class with concrete subclasses that store runtime options for the Ensembl Variant Effect Predictor.

Details

  • The VEPParam family of objects stores runtime options for querying the Ensembl Variant Effect Predictor (VEP). Brief descriptions of the options are provided below. For complete details, see the Ensembl VEP web page.

    http://uswest.ensembl.org/info/docs/tools/vep/script/vep_options.html

  • VEPParam subclasses: As of ensemblVEP version >= 1.3.3 a new subclass of VEPParam is created when there is a substantial change in the Ensembl variant database API. The subclass will support all versions up until the next 'substantial' version change. The version accessor on a VEPParam object lists all versions that particular VEPParam class supports. By default the VEPParam constructor creates a subclass that supports the current version. To create a VEPParam for a specific version, supply the version as an argument. Use supportedVEP() to see all supported versions.

  • Archived versions: Past versions of the VEP script and corresponding data are available on the Ensembl archive page.

    http://uswest.ensembl.org/info/website/archives/index.html

    Archived scripts can query cached data or perform a live query against the European mirror. (The US mirror, useastdb, hosts the current release only.) The appropriate version of cached data can be downloaded from the same page as the archived script.

  • Multiple versions: By default, the variant_effect_predictor.pl script found in the PATH is the script used. If multiple versions of the script are installed locally a few steps must be taken to ensure the proper version is used.

    • scriptPath Provide the full path to the variant_effect_predictor.pl script (including the .pl extension) as the scriptPath argument to the VEPParam constructor.

    • cache directories By default, the cache runtime options dir, dir_cache and dir_plugins are set to $HOME/.vep. These locations need to be specified if the data are not in the default $HOME/.vep location.

Runtime options

For a description of runtime options for the most current version of the API see the ?runtimeOptions man page or the Ensembl web site:

http://www.ensembl.org/info/docs/tools/vep/script/vep_options.html

Runtime options for archived versions can be found on the corresponding archive page.

Constructor

VEPParam(version=max(unlist(currentVEP()), basic=basicOpts(), input=inputOpts(), cache=cacheOpts(), output=outputOpts(), filterqc=filterqcOpts(), database=databaseOpts(), advanced=advancedOpts(), identifier=identifierOpts(), colocatedVariants=colocatedVariantsOpts(), dataformat=dataformatOpts(), scriptPath=character(), ...) Creates a VEPParam object.

version

Numeric specifying the Ensembl API version(s) supported.

basic

list of basic options

input

list of input options

cache

list of cache options

output

list of output options

filterqc

list of filterqc options

database

list of database options

advanced

list of advanced options

scriptPath

character path to variant_effect_predictor.pl script; applicable when multiple versions of the script are installed locally

Supported for VEPParam73 and later:

identifier

list of identifier options

colocatedVariants

list of colocatedVariants options

dataformat

list of dataformat options

Accessors

In the following code, x is a VEPParam object and value is a named list or character vector.

basic(x), basic(x) <- value

input(x), input(x) <- value

cache(x), cache(x) <- value

output(x), output(x) <- value

filterqc(x), filterqc(x) <- value

database(x), database(x) <- value

advanced(x), advanced(x) <- value

version(x), version(x) <- value

scriptPath(x), scriptPath(x) <- value

Supported for VEPParam73 and later:

identifier(x), identifier(x) <- value

colocatedVariants(x), colocatedVariants(x) <- value

dataformat(x), dataformat(x) <- value

Helper functions

currentVEP(): Invoked with no arguments. Returns the most current VEPParam class and supported Ensembl API versions. A single class may support more than one version.

supportedVEP(): Invoked with no arguments. Returns a list of VEPParam subclasses and the Ensembl API versions they support.

The following functions create a list of runtime options and are used in the VEPParam constructor.

basicOpts(version, ...)

inputOpts(version, ...)

cacheOpts(version, ...)

outputOpts(version, ...)

filterqcOpts(version, ...)

databaseOpts(version, ...)

advancedOpts(version, ...)

Supported for VEPParam73 and later:

identifierOpts(version, ...)

colocatedVariantsOpts(version, ...)

dataformatOpts(version, ...)

Author(s)

Valerie Obenchain

See Also

  • The runtimeOptions man page.

  • The ensemblVEP function man page.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
  ## -----------------------------------------------------------------------
  ## Current API version
  ## -----------------------------------------------------------------------
  ## The default constructor supports the most current version
  ## of the Ensembl variant API.
  param <- VEPParam()
  class(param)

  ## The 'version' slot lists all API versions supported by the class.
  version(param)

  ## The 'supportedVEP' helper returns a list of VEPParam classes and the 
  ## corresponding API versions they support. 
  supportedVEP()

  ## -----------------------------------------------------------------------
  ## Archived API versions
  ## -----------------------------------------------------------------------
  ## Create a VEPParam for an archived version by supplying the 
  ## version to the constructor.
  param67 <- VEPParam(67)
  param67

  ## Archive versions can query the cache or the European mirror. The
  ## default 'host' for live queries is set to 'ensembldb.ensembl.org'.
  database(param67)$host

  ## By default the VEP script used is the one found in the PATH.
  ## To specify a script in a non-standard location use the 'scriptPath' 
  ## setter. Include the full path and the name of the script with the
  ## .pl extension.
  ## Not run:  
  scriptPath(param) <- "fullPathToScript/variant_effect_predictor.pl"
  
## End(Not run)

  ## -----------------------------------------------------------------------
  ## Manipulation
  ## -----------------------------------------------------------------------

  ## View the values in 'basic' and 'input'.
  basic(param)
  input(param)

  ## Change the value of the 'everything' to TRUE.
  basic(param)$everything
  basic(param)$everything <- TRUE
  basic(param)$everything

  ## Replace multiple values using a named list.
  basic(param) <- list(verbose=TRUE, config="myconfig.txt")
  basic(param)

  ## Write the output to myfile.vcf instead of returning a VCF object.
  ## Return the sift and polyphen predictions only (not scores).
  param <- VEPParam(input=c(output_file="path/myfile.vcf"),
                    output=c(sift="p", polyphen="p"))

  ## 'sift' and 'polyphen' are runtime options that require
  ## a character value, (i.e., 's', 'p', or 'b').
  output(param)$sift

  ## To turn off 'sift' or 'polyphen' set the value to an
  ## empty character (i.e., character()).
  output(param)$sift <- character()