The goal of ensemblr is to provide an R client to the Ensembl REST API.

Please note that this package is still in its infancy and hence only a small fraction of the resources exposed by the Ensembl REST API are retrievable via ensemblr. You can check the functionality covered so far in Ensembl REST API Coverage.

Installation

You can install the current, very experimental version of ensemblr with:

# install.packages("remotes")
remotes::install_github("maialab/ensemblr")

Cheatsheet

TODO

Example

Retrieve human linkage disequilibrium information for variants within a 1 kilobase window centred on variant 'rs123':

library(ensemblr)
get_ld_variants_by_window('rs123', genomic_window_size = 1L)
#> # A tibble: 6 × 6
#>   species_name population              variant_id1 variant_id2 r_squared d_prime
#>   <chr>        <chr>                   <chr>       <chr>           <dbl>   <dbl>
#> 1 homo_sapiens 1000GENOMES:phase_3:CEU rs123       rs124           0.722   1.00 
#> 2 homo_sapiens 1000GENOMES:phase_3:CEU rs123       rs114           0.475   0.703
#> 3 homo_sapiens 1000GENOMES:phase_3:CEU rs123       rs10239961      0.255   1.00 
#> 4 homo_sapiens 1000GENOMES:phase_3:CEU rs123       rs12536724      0.255   1.00 
#> 5 homo_sapiens 1000GENOMES:phase_3:CEU rs123       rs122           0.722   1.00 
#> 6 homo_sapiens 1000GENOMES:phase_3:CEU rs123       rs115           0.721   1.00

Contributors

Please note that the ensemblr project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Similar projects