## -----------------------------------------------------------------------
## 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()
Run the code above in your browser using DataLab