Skip to content

Commit

Permalink
Prevent duplicate download, fix indents
Browse files Browse the repository at this point in the history
  • Loading branch information
jwokaty committed Oct 7, 2024
1 parent d37a750 commit ad64592
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions R/cache.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@
#' @noRd
.download_and_cache <- function(url, quietly = TRUE) {
bfc <- .get_cache()
rid <- bfcquery(bfc, url)$rid
rid <- bfcquery(bfc, url, "rname")$rid
if (!length(rid)) {
if (!quietly) {
inform(paste("Downloading", url, "..."))
}
rid <- names(bfcadd(bfc, url))
}
if (!isFALSE(bfcneedsupdate(bfc, rid))) {
bfcdownload(bfc, rid, ask = FALSE)
rid <- names(bfcadd(bfc,
rname = url, fpath = url, rtype = "web",
download = TRUE, verbose = !quietly
))
}
bfcrpath(bfc, rids = rid)
}
2 changes: 1 addition & 1 deletion vignettes/bedbaser.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ bb_to_granges(api, bed_id)

```{r bb_to_granges_big_bed}
ex_bed <- bb_example(api, "bed")
bb_to_granges(api, ex_bed$id, "bigbed")
bb_to_granges(api, ex_bed$id, "bigbed", quietly = FALSE)
```

## Import a BEDset into a GRangesList
Expand Down

0 comments on commit ad64592

Please sign in to comment.