Last data update: 2014.03.03

R: VEPParam objects
VEPParam-classR Documentation

VEPParam objects

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

  ## -----------------------------------------------------------------------
  ## 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() 

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ensemblVEP)
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: GenomicRanges
Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: VariantAnnotation
Loading required package: SummarizedExperiment
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: Rsamtools
Loading required package: Biostrings
Loading required package: XVector

Attaching package: 'VariantAnnotation'

The following object is masked from 'package:base':

    tabulate

variant_effect_predictor.pl not found. Ensembl VEP is not installed in your path.

Attaching package: 'ensemblVEP'

The following object is masked from 'package:Biobase':

    cache

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/ensemblVEP/VEPParam-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: VEPParam-class
> ### Title: VEPParam objects
> ### Aliases: class:VEPParam VEPParam-class class:VEPParam67
> ###   VEPParam67-class class:VEPParam73 VEPParam73-class class:VEPParam75
> ###   VEPParam75-class class:VEPParam77 VEPParam77-class class:VEPParam78
> ###   VEPParam78-class class:VEPParam82 VEPParam82-class VEPParam basicOpts
> ###   inputOpts cacheOpts outputOpts identifierOpts colocatedVariantsOpts
> ###   dataformatOpts filterqcOpts databaseOpts advancedOpts basic basic<-
> ###   basic,VEPParam-method basic<-,VEPParam-method input input<-
> ###   input,VEPParam-method input<-,VEPParam-method cache cache<-
> ###   cache,VEPParam-method cache<-,VEPParam-method output output<-
> ###   output,VEPParam-method output<-,VEPParam-method filterqc filterqc<-
> ###   filterqc,VEPParam-method filterqc<-,VEPParam-method database
> ###   database<- database,VEPParam-method database<-,VEPParam-method
> ###   advanced advanced<- advanced,VEPParam-method
> ###   advanced<-,VEPParam-method version version<- scriptPath scriptPath<-
> ###   identifier identifier<- identifier,VEPParam73-method
> ###   identifier<-,VEPParam73-method identifier,VEPParam75-method
> ###   identifier<-,VEPParam75-method identifier,VEPParam77-method
> ###   identifier<-,VEPParam77-method identifier,VEPParam78-method
> ###   identifier<-,VEPParam78-method identifier,VEPParam82-method
> ###   identifier<-,VEPParam82-method dataformat dataformat<-
> ###   dataformat,VEPParam73-method dataformat<-,VEPParam73-method
> ###   dataformat,VEPParam75-method dataformat<-,VEPParam75-method
> ###   dataformat,VEPParam77-method dataformat<-,VEPParam77-method
> ###   dataformat,VEPParam78-method dataformat<-,VEPParam78-method
> ###   dataformat,VEPParam82-method dataformat<-,VEPParam82-method
> ###   colocatedVariants colocatedVariants<-
> ###   colocatedVariants,VEPParam73-method
> ###   colocatedVariants<-,VEPParam73-method
> ###   colocatedVariants,VEPParam75-method
> ###   colocatedVariants<-,VEPParam75-method
> ###   colocatedVariants,VEPParam77-method
> ###   colocatedVariants<-,VEPParam77-method
> ###   colocatedVariants,VEPParam78-method
> ###   colocatedVariants<-,VEPParam78-method
> ###   colocatedVariants,VEPParam82-method
> ###   colocatedVariants<-,VEPParam82-method currentVEP supportedVEP
> ###   show,VEPParam-method
> ### Keywords: methods classes
> 
> ### ** Examples
> 
>   ## -----------------------------------------------------------------------
>   ## Current API version
>   ## -----------------------------------------------------------------------
>   ## The default constructor supports the most current version
>   ## of the Ensembl variant API.
>   param <- VEPParam()
>   class(param)
[1] "VEPParam82"
attr(,"package")
[1] "ensemblVEP"
> 
>   ## The 'version' slot lists all API versions supported by the class.
>   version(param)
[1] 82
> 
>   ## The 'supportedVEP' helper returns a list of VEPParam classes and the 
>   ## corresponding API versions they support. 
>   supportedVEP()
$VEPParam67
[1] 67

$VEPParam73
[1] 73 74

$VEPParam75
[1] 75

$VEPParam77
[1] 77

$VEPParam78
[1] 78 80 81

$VEPParam82
[1] 82 83 84

> 
>   ## -----------------------------------------------------------------------
>   ## Archived API versions
>   ## -----------------------------------------------------------------------
>   ## Create a VEPParam for an archived version by supplying the 
>   ## version to the constructor.
>   param67 <- VEPParam(67)
>   param67
class: VEPParam67 
basic(0):
input(1): species
cache(1): dir
output(1): terms
filterqc(0):
database(1): host
advanced(1): buffer_size
version: 67
scriptPath:  
> 
>   ## 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
[1] "ensembldb.ensembl.org"
> 
>   ## 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: 
> ##D  
> ##D   scriptPath(param) <- "fullPathToScript/variant_effect_predictor.pl"
> ##D   
> ## End(Not run)
> 
>   ## -----------------------------------------------------------------------
>   ## Manipulation
>   ## -----------------------------------------------------------------------
> 
>   ## View the values in 'basic' and 'input'.
>   basic(param)
$verbose
[1] FALSE

$quiet
[1] FALSE

$no_progress
[1] FALSE

$config
character(0)

$everything
[1] FALSE

$fork
numeric(0)

>   input(param)
$species
[1] "homo_sapiens"

$format
character(0)

$output_file
character(0)

$force_overwrite
[1] FALSE

$stats_file
character(0)

$no_stats
[1] FALSE

$stats_text
[1] FALSE

$html
[1] FALSE

$assembly
character(0)

> 
>   ## Change the value of the 'everything' to TRUE.
>   basic(param)$everything
[1] FALSE
>   basic(param)$everything <- TRUE
>   basic(param)$everything
[1] TRUE
> 
>   ## Replace multiple values using a named list.
>   basic(param) <- list(verbose=TRUE, config="myconfig.txt")
>   basic(param)
$verbose
[1] TRUE

$quiet
[1] FALSE

$no_progress
[1] FALSE

$config
[1] "myconfig.txt"

$everything
[1] TRUE

$fork
numeric(0)

> 
>   ## 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
[1] "p"
> 
>   ## To turn off 'sift' or 'polyphen' set the value to an
>   ## empty character (i.e., character()).
>   output(param)$sift <- character() 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>