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("pak")
pak::pak("patterninstitute/ensemblr")
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 rs122 0.722 1.00
#> 3 homo_sapiens 1000GENOMES:phase_3:CEU rs123 rs115 0.721 1.00
#> 4 homo_sapiens 1000GENOMES:phase_3:CEU rs123 rs12536724 0.255 1.00
#> 5 homo_sapiens 1000GENOMES:phase_3:CEU rs123 rs10239961 0.255 1.00
#> 6 homo_sapiens 1000GENOMES:phase_3:CEU rs123 rs114 0.475 0.703
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.
Logo
The ensemblr logo, ensemblr.png
, is a derivative work of an illustration of “The small DNA double helix in PDB entry 309d” by David S. Goodsell and the RCSB PDB, used under CC-BY-4.0. ensemblr.png
is licensed under CC-BY-4.0 by Ramiro Magno.
Similar projects
- R package rensembl by David Winter: https://github.com/dwinter/rensembl
- Python package ensembl-rest by Andrés García: https://github.com/Ad115/EnsemblRest
- Python package ensembl by Katsuya Noguchi: https://github.com/kn/ensembl