Skip to content

Commit

Permalink
Merge pull request #51 from stitam/webhis2
Browse files Browse the repository at this point in the history
Do not use web histories by default with ncbi_link_uid()
  • Loading branch information
stitam authored Jan 17, 2024
2 parents dce3d84 + d11a634 commit b710f93
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion R/ncbi_link_uid.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
#' However, if it is specified, it must be identical to the \code{db} attribute
#' of the \code{"ncbi_uid"} object. If query is a character vector, the
#' \code{from} argument is required.
#' @note \code{ncbi_link_uid()} can work with or without web histories, but the
#' behaviour of the function with web histories is unreliable. The option is
#' there but it is recommended NOT to use web histories with this function.
#' @examples
#' \dontrun{
#' ncbi_link_uid("4253631", "assembly", "biosample")
Expand All @@ -49,7 +52,7 @@ ncbi_link_uid <- function(
from = NULL,
to,
batch_size = 100,
use_history = TRUE,
use_history = FALSE,
verbose = getOption("verbose")
) {
if ("ncbi_uid" %in% class(query)) {
Expand Down
7 changes: 6 additions & 1 deletion man/ncbi_link_uid.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-ncbi_link_uid.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ test_that("ncbi_link_uid() converts using input history", {
# input is ncbi_uid object with history
assembly_uid <- ncbi_get_uid(examples$assembly, db = "assembly")
biosample_uid <- ncbi_link_uid(
assembly_uid, from = "assembly", to = "biosample"
assembly_uid, from = "assembly", to = "biosample", use_history = TRUE
)
expect_true(all(c("ncbi_uid", "list") %in% class(biosample_uid)))
expect_true(all(biosample_uid$uid %in% c("2952905", "1730125")))
Expand Down

0 comments on commit b710f93

Please sign in to comment.