Draft
Fix ensemblVEP.Rmd: guard API-dependent chunks against Ensembl REST failures#121
Conversation
The vignette was calling vep_by_region() -> post_Hs_region() during package build, which makes a live POST to the Ensembl REST API. When the API returned HTTP 500, the vignette build failed hard. Fix: wrap the API call in tryCatch, set a vep_avail flag, and gate all API-dependent chunks on eval=vep_avail. When the API is unavailable, the chunks are skipped and the build succeeds; when available, the vignette runs in full. Also add vep_avail <- FALSE default to setup chunk so the flag is always defined before any chunk references it.
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job bioccheck / check (devel)
Fix ensemblVEP.Rmd: guard API-dependent chunks against Ensembl REST failures
Jul 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
bioccheck / check (devel)CI job was failing becauseensemblVEP.Rmdmakes a live POST tohttps://rest.ensembl.org/vep/homo_sapiens/regionduring the package build. A transient HTTP 500 from Ensembl causedhttr::stop_for_status()to throw, crashing vignette compilation.Changes to
vignettes/ensemblVEP.Rmdsetupchunk: initialisevep_avail <- FALSEso the flag is always defined before any chunk references it.lksnvchunk: wrapvep_by_region()intryCatch; on any error, emit a message and returnNULL. Setvep_avail <- !is.null(res)and computejansonly on success.doj1,doj2,doj3,lktaaaa,lkmakeg,lkmc): addeval=vep_availso they are skipped when the API is unavailable.When the API is reachable the vignette renders in full; when it is not, the dependent chunks are skipped and the build succeeds.