vep_by_region: Use the VEP region API on variant information in a VCF object...

View source: R/use_vep_api.R

vep_by_regionR Documentation

Use the VEP region API on variant information in a VCF object as defined in VariantAnnotation.

Description

Use the VEP region API on variant information in a VCF object as defined in VariantAnnotation.

Usage

vep_by_region(vcfobj, snv_only = TRUE, chk_max = TRUE)

Arguments

vcfobj

instance of VCF class; note the difference between the CollapsedVCF and ExpandedVCF instances.

snv_only

logical(1) if TRUE filter the VCF to information about single nucleotide addresses

chk_max

logical(1) requests to ensembl VEP API are limited to 200 positions; if TRUE and the request involves more than 200 positions, an error is thrown by this function.

Value

instance of 'response' from httr package

Examples

fl <- system.file("extdata", "chr22.vcf.gz", package="VariantAnnotation")
r22 = readVcf(fl)
dr = which(width(rowRanges(r22))!=1)
r22s = r22[-dr]
res = vep_by_region(r22[1:100], snv_only=FALSE, chk_max=FALSE)
ans = jsonlite::fromJSON(jsonlite::toJSON(httr::content(res)))

Bioconductor/VariantAnnotation documentation built on Nov. 2, 2024, 7:22 a.m.