Skip to content

Commit b710f93

Browse files
authored
Merge pull request #51 from stitam/webhis2
Do not use web histories by default with ncbi_link_uid()
2 parents dce3d84 + d11a634 commit b710f93

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

R/ncbi_link_uid.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
#' However, if it is specified, it must be identical to the \code{db} attribute
3939
#' of the \code{"ncbi_uid"} object. If query is a character vector, the
4040
#' \code{from} argument is required.
41+
#' @note \code{ncbi_link_uid()} can work with or without web histories, but the
42+
#' behaviour of the function with web histories is unreliable. The option is
43+
#' there but it is recommended NOT to use web histories with this function.
4144
#' @examples
4245
#' \dontrun{
4346
#' ncbi_link_uid("4253631", "assembly", "biosample")
@@ -49,7 +52,7 @@ ncbi_link_uid <- function(
4952
from = NULL,
5053
to,
5154
batch_size = 100,
52-
use_history = TRUE,
55+
use_history = FALSE,
5356
verbose = getOption("verbose")
5457
) {
5558
if ("ncbi_uid" %in% class(query)) {

man/ncbi_link_uid.Rd

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-ncbi_link_uid.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ test_that("ncbi_link_uid() converts using input history", {
44
# input is ncbi_uid object with history
55
assembly_uid <- ncbi_get_uid(examples$assembly, db = "assembly")
66
biosample_uid <- ncbi_link_uid(
7-
assembly_uid, from = "assembly", to = "biosample"
7+
assembly_uid, from = "assembly", to = "biosample", use_history = TRUE
88
)
99
expect_true(all(c("ncbi_uid", "list") %in% class(biosample_uid)))
1010
expect_true(all(biosample_uid$uid %in% c("2952905", "1730125")))

0 commit comments

Comments
 (0)