get_variants_from_locations: Using ensembl API to get the variants at certain locations

View source: R/utils.R

get_variants_from_locationsR Documentation

Using ensembl API to get the variants at certain locations

Description

Use GET to query the ensembl REST API to gather variants located on specific locations. The content is fetched as a JSON and then translated as a data.frame, using toJSON /!\ the column order is sometimes different.

Usage

get_variants_from_locations(locations, verbose = FALSE)

Arguments

locations

a vector of locations (eg: c("chr1:1000:10000", "chr2:10-100"))

verbose

if TRUE, will print progress messages (default: FALSE)

Value

a data.frame containing the following columns:

  • clinical_significance

  • start

  • consequence_type

  • alleles

  • seq_region_name

  • feature_type

  • source

  • strand

  • assembly_name

  • end

  • id

Examples

get_variants_from_locations(c("chr1:100:1000", "chr10:2004:12042"))

MCorentin/vargen documentation built on Feb. 6, 2024, 2:32 p.m.