Parse the CSQ column of a VCF object into a GRanges object
Parse the CSQ column in a VCF object returned from the Ensembl Variant Effect Predictor (VEP).
1 2 3 4 5 6
The name of the INFO key that VEP writes the consequences to in the output
Arguments passed to other methods. Currently not used.
VCFobject, the consequence data are returned unparsed in the 'CSQ' INFO column.
parseCSQToGRangesparses these data into a
GRangesobject that is expanded to match the dimension of the 'CSQ' data. Because each variant can have multiple matches, the ranges in the
If rownames from the original VCF are provided as
VCFRowIDa metadata column is included in the result that maps back to the row (variant) in the original VCF.
GRanges object with consequence data as the
Ensembl VEP Home: http://uswest.ensembl.org/info/docs/tools/vep/index.html
1 2 3 4 5 6 7 8 9 10
file <- system.file("extdata", "ex2.vcf", package="VariantAnnotation") vep <- ensemblVEP(file, param=VEPParam(dataformat=c(vcf=TRUE))) ## The returned 'CSQ' data are unparsed. info(vep)$CSQ ## Parse into a GRanges and include the 'VCFRowID' column. vcf <- readVcf(file, "hg19") csq <- parseCSQToGRanges(vep, VCFRowID=rownames(vcf)) csq[1:4]