Description Usage Arguments Details Value Author(s) References See Also Examples
Retrieve variant annotation data from the Ensembl Variant Effect Predictor (VEP).
1 2 | ## S4 method for signature 'character'
ensemblVEP(file, param=VEPFlags(), ..., verbose=FALSE)
|
file |
A Valid input file types are described on the Ensembl VEP web page. http://www.ensembl.org/info/docs/variation/vep/vep_script.html#running |
param |
An instance of |
... |
Additional arguments passed to methods. |
verbose |
logical(1) should system call to vep be printed |
The Ensembl VEP tool is described in detail on the home page
(link in 'see also' section). The ensemblVEP
function
wraps the perl API and requires a local install of the Ensembl
VEP available in the user's path. The VEPFlags
class
provides a way to specify runtime options. Results are returned
from Ensembl VEP as GRanges
(default) or VCF
objects.
Alternatively, results can be written directly to a file.
Note: if using vep version < 90 the param is an instance of
VEPParam
instead of VEPFlags
. The default host is
not specified and therefore will use vep default of
ensembldb.ensembl.org
. Users in the US may find connection
and transfer speeds quicker using our East coast mirror,
useastdb.ensembl.org
.
Default behavior returns a GRanges
object. Options can be
set to return a VCF object or write a file to disk.
Valerie Obenchain and Lori Shepherd
Ensembl VEP Home: http://www.ensembl.org/info/docs/tools/vep/index.html
Human Genome Variation Society (hgvs): http://www.hgvs.org/mutnomen/
VEPFlags-class
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 66 67 68 | ## -----------------------------------------------------------------------
## Results returned as GRanges or VCF objects
## -----------------------------------------------------------------------
## The default behavior returns a GRanges with the consequence
## data as metadata columns.
file <- system.file("extdata", "ex2.vcf", package="VariantAnnotation")
## Not run:
gr <- ensemblVEP(file)
gr[1:3]
## End(Not run)
## When the 'vcf' option is TRUE, a VCF object is returned.
myparam <- VEPFlags(flags=list(vcf=TRUE, host="useastdb.ensembl.org"))
vcf <- ensemblVEP(file, param=myparam)
vcf
## The consequence data are returned as the 'CSQ' column in info.
info(vcf)$CSQ
## To parse this column use parseCSQToGRanges().
csq <- parseCSQToGRanges(vcf)
head(csq, 4)
## The columns returned are controlled by the 'fields' option.
## By default all fields are returned. See ?VEPFlags for details.
## When comparing ensemblVEP() results to the data in the
## input vcf we see variant 20:1230237 was not returned.
vcf_input <- readVcf(file, "hg19")
rowRanges(vcf_input)
rowRanges(vcf)
## This variant has no alternate allele and is called a
## monomorphic reference. The Ensembl VEP automatically
## drops these variants.
rowRanges(vcf)[,c("REF", "ALT")]
## -----------------------------------------------------------------------
## Results written to disk
## -----------------------------------------------------------------------
## Write a file to disk by providing a path and file name as 'output_file'.
## Different output file formats are specified using the 'dataformat'
## runtime options.
## Write a vcf file to myfile.vcf:
myparam <- VEPFlags(flags=list(vcf=TRUE,
output_file="/path/myfile.vcf"))
## Write a gvf file to myfile.gvf:
myparam <- VEPFlags(flags=list(gvf=TRUE,
output_file="/path/myfile.gvf"))
## -----------------------------------------------------------------------
## Runtime options
## -----------------------------------------------------------------------
## All runtime options are controlled by specifying a VEPFlags.
## See ?VEPFlags for complete details.
param <- VEPFlags()
## Logical options are turned on/off with TRUE/FALSE. By
## default, 'quiet' is FALSE.
## Setting 'quiet' to TRUE will suppress all status and warnings.
flags(param)$quiet <- TRUE
## Characater options are turned on/off by specifying a character
## value or an empty character (i.e., character()). By default no
## 'sift' results are returned.
## Setting 'sift' to 'b' will return both predictions and scores.
flags(param)$sift <- 'b'
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.