Skip to contents

Determine whether an id(s) is/are present in a database.

Usage

is_in_db(id, db = "nucleotide")

Arguments

id

character, sequence accession ID(s)

db

character, database name

Value

named vector of booleans

See also

Examples

library(restez)
# set the restez path to a temporary dir
restez_path_set(filepath = tempdir())
#> ... Creating '/tmp/RtmpJvhvXj/restez'
#> ... Creating '/tmp/RtmpJvhvXj/restez/downloads'
# create demo database
demo_db_create(n = 5)
# in the demo, IDs are 'demo_1', 'demo_2' ...
ids <- c('thisisnotanid', 'demo_1', 'demo_2')
(is_in_db(id = ids))
#> thisisnotanid        demo_1        demo_2 
#>         FALSE          TRUE          TRUE 


# delete demo after example
db_delete(everything = TRUE)