This function retrieves genes (Ensembl identifier) along with beta values and p-values for the eQTL association.

get_eqtl_pval_by_variant(
  variant_id,
  species_name = "homo_sapiens",
  verbose = FALSE,
  warnings = TRUE,
  progress_bar = TRUE
)

Arguments

variant_id

A variant identifier, e.g. "rs80100814".

species_name

The species name, i.e., the scientific name, all letters lowercase and space replaced by underscore. Currently, only 'homo_sapiens' (human) is supported.

verbose

Whether to be verbose about the http requests and respective responses' status.

warnings

Whether to show warnings.

progress_bar

Whether to show a progress bar.

Value

A tibble of 6 variables:

species_name

Ensembl species name: this is the name used internally by Ensembl to uniquely identify a species by name. It is the scientific name but formatted without capitalisation and spacing converted with an underscore, e.g., 'homo_sapiens'.

variant_id

Variant identifier, e.g. "rs80100814".

ensembl_id

An Ensembl stable identifier, e.g. "ENSG00000248234378".

tissue

Tissue.

beta

The effect size beta of the eQTL association analysis.

pvalue

The p-value of the eQTL association analysis.

Ensembl REST API endpoints

get_eqtl_pval_by_variant() makes GET requests to /eqtl/variant_name/:species/:variant_name.

Examples

get_eqtl_pval_by_variant('rs80100814')
#> # A tibble: 452 × 6 #> species_name variant_id ensembl_id tissue beta pvalue #> <chr> <chr> <chr> <chr> <dbl> <dbl> #> 1 homo_sapiens rs80100814 ENSG00000136237 Adipose_Subcutaneous -0.00990 0.953 #> 2 homo_sapiens rs80100814 ENSG00000233476 Adipose_Subcutaneous -0.0271 0.835 #> 3 homo_sapiens rs80100814 ENSG00000232759 Adipose_Subcutaneous -0.331 0.0776 #> 4 homo_sapiens rs80100814 ENSG00000232949 Adipose_Subcutaneous 0.100 0.647 #> 5 homo_sapiens rs80100814 ENSG00000105889 Adipose_Subcutaneous 0.0281 0.893 #> 6 homo_sapiens rs80100814 ENSG00000136244 Adipose_Subcutaneous 0.0885 0.551 #> 7 homo_sapiens rs80100814 ENSG00000179428 Adipose_Subcutaneous -0.261 0.204 #> 8 homo_sapiens rs80100814 ENSG00000196683 Adipose_Subcutaneous -0.173 0.163 #> 9 homo_sapiens rs80100814 ENSG00000228649 Adipose_Subcutaneous 0.0905 0.644 #> 10 homo_sapiens rs80100814 ENSG00000226329 Adipose_Subcutaneous 0.0103 0.957 #> # … with 442 more rows