Skip to content

Commit 35c4740

Browse files
committed
UCSC.utils 1.5.1
Get rid of internal utility load_package_gracefully() and use S4Vectors:::load_package_gracefully() instead.
1 parent 587098d commit 35c4740

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ biocViews: Infrastructure, GenomeAssembly, Annotation, GenomeAnnotation,
1010
DataImport
1111
URL: https://bioconductor.org/packages/UCSC.utils
1212
BugReports: https://github.com/Bioconductor/UCSC.utils/issues
13-
Version: 1.5.0
13+
Version: 1.5.1
1414
License: Artistic-2.0
1515
Encoding: UTF-8
1616
Authors@R: person("Hervé", "Pagès", role=c("aut", "cre"),
1717
18-
Imports: methods, stats, httr, jsonlite, S4Vectors
18+
Imports: methods, stats, httr, jsonlite, S4Vectors (>= 0.47.6)
1919
Suggests: DBI, RMariaDB, GenomeInfoDb, testthat, knitr, rmarkdown, BiocStyle
2020
VignetteBuilder: knitr
2121
Collate: 00utils.R

R/00utils.R

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
cached_rest_api_results <- new.env(parent=emptyenv())
22

3-
load_package_gracefully <- function(package, ...)
4-
{
5-
if (!requireNamespace(package, quietly=TRUE))
6-
stop("Could not load package ", package, ". Is it installed?\n\n ",
7-
wmsg("Note that ", ..., " requires the ", package, " package. ",
8-
"Please install it with:"),
9-
"\n\n BiocManager::install(\"", package, "\")")
10-
}
11-
123

134
### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
145
### make_data_frame_from_list_of_rows()

R/UCSC_dbselect.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ UCSC_dbselect <- function(dbname, from, columns=NULL, where=NULL, MoreSQL=NULL,
8686
host="genome-mysql.soe.ucsc.edu",
8787
port=3306)
8888
{
89-
load_package_gracefully("DBI", "UCSC_dbselect()")
90-
load_package_gracefully("RMariaDB", "UCSC_dbselect()")
89+
S4Vectors:::load_package_gracefully("DBI", "by UCSC_dbselect()")
90+
S4Vectors:::load_package_gracefully("RMariaDB", "by UCSC_dbselect()")
9191

9292
SQL <- .make_SQL_SELECT(from, columns=columns, where=where, MoreSQL=MoreSQL)
9393
dbconn <- DBI::dbConnect(RMariaDB::MariaDB(), dbname=dbname,

0 commit comments

Comments
 (0)