diff --git a/DESCRIPTION b/DESCRIPTION index 309952a..70ba140 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: igvShiny Title: igvShiny: a wrapper of Integrative Genomics Viewer (IGV - an interactive tool for visualization and exploration integrated genomic data) -Version: 1.0.3 +Version: 1.0.4 Date: 2024-08-25 Authors@R: c( person("Paul","Shannon", role = c("aut"), @@ -29,7 +29,6 @@ Imports: httr, jsonlite, randomcoloR, - RCurl, utils Suggests: BiocStyle, diff --git a/NEWS.md b/NEWS.md index 95386d5..5156899 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +## igvShiny 1.0.4 - 2024-08-25 +* switch from Rcurl::url.exists to httr::http_error (Windows compatibility) + ## igvShiny 1.0.3 - 2024-08-25 * stop using Amazon S3 URLs by default diff --git a/R/GWASTrack.R b/R/GWASTrack.R index 300ea9d..c28aae2 100644 --- a/R/GWASTrack.R +++ b/R/GWASTrack.R @@ -127,7 +127,7 @@ GWASTrack <- function(trackName, } if (data.class == "character") { - if (!RCurl::url.exists(data)) { + if (httr::http_error(data)) { # was a legitimate url provided? error.message <- sprintf("error: putative gwas file url unreachable: '%s'", diff --git a/R/genomeSpec.R b/R/genomeSpec.R index 99ff2bd..6e804e3 100644 --- a/R/genomeSpec.R +++ b/R/genomeSpec.R @@ -61,7 +61,7 @@ get_css_genomes <- function(test = FALSE) { current.genomes.file <- "https://igv.org/genomes/genomes.json" - if (!RCurl::url.exists(current.genomes.file)) + if (httr::http_error(current.genomes.file)) return(get_basic_genomes()) current.genomes.raw <- @@ -189,7 +189,9 @@ parseAndValidateGenomeSpec <- function(genomeName, exists.function <- switch(dataMode, "localFiles" = file.exists, - "http" = RCurl::url.exists) + "http" = function(x, ...) { + !(httr::http_error(x, ...)) + }) stopifnot(exists.function(fasta)) stopifnot(exists.function(fastaIndex)) if (!is.na(genomeAnnotation)) diff --git a/R/packages.R b/R/packages.R index b94509e..37e3c11 100644 --- a/R/packages.R +++ b/R/packages.R @@ -2,4 +2,3 @@ # switch to namespace::function #' @importFrom checkmate assert_string -#' @importFrom RCurl url.exists