Skip to contents

Return the definition line for an accession ID.

Usage

gb_definition_get(id)

Arguments

id

character, sequence accession ID(s)

Value

named vector of definitions, if no results found NULL

Examples

library(restez)
restez_path_set(filepath = tempdir())
#> ... Creating '/tmp/RtmpWQaZTT/restez'
#> ... Creating '/tmp/RtmpWQaZTT/restez/downloads'
demo_db_create(n = 5)
#> duckdb keeps downloaded extensions and secrets in a temporary directory:
#>  /tmp/RtmpWQaZTT/duckdb
#> This is removed when the R session ends.
#>  Extensions are re-downloaded each session.
#>  Secrets are lost.
#>  Run duckdb(shared_home = TRUE) (or create ~/.duckdb) to keep them (suitable for most users).
#>  Run duckdb(shared_home = FALSE) to accept the temporary directory (and silence this message).
#>  See ?duckdb_storage for details and alternatives.
(def <- gb_definition_get(id = 'demo_1'))
#> duckdb keeps downloaded extensions and secrets in a temporary directory:
#>  /tmp/RtmpWQaZTT/duckdb
#> This is removed when the R session ends.
#>  Extensions are re-downloaded each session.
#>  Secrets are lost.
#>  Run duckdb(shared_home = TRUE) (or create ~/.duckdb) to keep them (suitable for most users).
#>  Run duckdb(shared_home = FALSE) to accept the temporary directory (and silence this message).
#>  See ?duckdb_storage for details and alternatives.
#>                                 demo_1 
#> "A demonstration sequence | id demo_1" 
(defs <- gb_definition_get(id = c('demo_1', 'demo_2')))
#> duckdb keeps downloaded extensions and secrets in a temporary directory:
#>  /tmp/RtmpWQaZTT/duckdb
#> This is removed when the R session ends.
#>  Extensions are re-downloaded each session.
#>  Secrets are lost.
#>  Run duckdb(shared_home = TRUE) (or create ~/.duckdb) to keep them (suitable for most users).
#>  Run duckdb(shared_home = FALSE) to accept the temporary directory (and silence this message).
#>  See ?duckdb_storage for details and alternatives.
#>                                 demo_1                                 demo_2 
#> "A demonstration sequence | id demo_1" "A demonstration sequence | id demo_2" 


# delete demo after example
db_delete(everything = TRUE)