Return the entire GenBank record for an accession ID.
Equivalent to rettype='gb'
in rentrez::entrez_fetch()
.
See also
Other get:
gb_definition_get()
,
gb_fasta_get()
,
gb_organism_get()
,
gb_sequence_get()
,
gb_version_get()
Examples
library(restez)
restez_path_set(filepath = tempdir())
#> ... Creating '/tmp/RtmpSQgfK5/restez'
#> ... Creating '/tmp/RtmpSQgfK5/restez/downloads'
demo_db_create(n = 5)
(rec <- gb_record_get(id = 'demo_1'))
#> demo_1
#> "LOCUS [This is a mock GenBank data record]\nDEFINITION A demonstration sequence | id demo_1\nACCESSION demo_1\nVERSION 2\nKEYWORDS [keyword]\nSOURCE [tissue, organism]\nORGANISM Unreal organism 1\nREFERENCE [reference data]\nAUTHORS [all the authors]\nTITLE [title]\nJOURNAL [journal]\nFEATURES [features]\n\nORIGIN \n 1 aatactagac\n"
(recs <- gb_record_get(id = c('demo_1', 'demo_2')))
#> demo_1
#> "LOCUS [This is a mock GenBank data record]\nDEFINITION A demonstration sequence | id demo_1\nACCESSION demo_1\nVERSION 2\nKEYWORDS [keyword]\nSOURCE [tissue, organism]\nORGANISM Unreal organism 1\nREFERENCE [reference data]\nAUTHORS [all the authors]\nTITLE [title]\nJOURNAL [journal]\nFEATURES [features]\n\nORIGIN \n 1 aatactagac\n"
#> demo_2
#> "LOCUS [This is a mock GenBank data record]\nDEFINITION A demonstration sequence | id demo_2\nACCESSION demo_2\nVERSION 2\nKEYWORDS [keyword]\nSOURCE [tissue, organism]\nORGANISM Unreal organism 2\nREFERENCE [reference data]\nAUTHORS [all the authors]\nTITLE [title]\nJOURNAL [journal]\nFEATURES [features]\n\nORIGIN \n 1 gccggacttt\n"
# delete demo after example
db_delete(everything = TRUE)