-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
This works, because the ID is listed in SRA:
webseq::ncbi_get_uid(term = "DRX061127", db = "sra")$uid
#> [1] 6133648Created on 2025-07-15 with reprex v2.1.1
This gives an error:
webseq::ncbi_get_uid(term = "DRX061127", db = "nuccore")$uid
#> Error in hit$count: $ operator is invalid for atomic vectorsCreated on 2025-07-15 with reprex v2.1.1
However, it works with random characters instead of an ID (no UID found, of course):
webseq::ncbi_get_uid(term = "vbaelvhjjzfv", db = "nuccore")$uid
#> [1] NACreated on 2025-07-15 with reprex v2.1.1
And interestingly, it also works with the SRA ID if I set use_history = FALSE (no ID found, of course):
webseq::ncbi_get_uid(term = "DRX061127", db = "nuccore", use_history = FALSE)$uid
#> [1] NACreated on 2025-07-15 with reprex v2.1.1
It seems the function only fails if the ID exists, but in a different database, and use_history = TRUE.
I did some digging and I think the issue is with rentrez, more specifically, with entrez_search().
Metadata
Metadata
Assignees
Labels
No labels