Return the sequence(s) for a record(s) from the accession ID(s).
Details
For more information about the dnabin format, see ape::DNAbin().
Examples
library(restez)
restez_path_set(filepath = tempdir())
#> ... Creating '/tmp/RtmpV5k46F/restez'
#> ... Creating '/tmp/RtmpV5k46F/restez/downloads'
demo_db_create(n = 5)
(seq <- gb_sequence_get(id = 'demo_1'))
#> demo_1
#> "AGTTGAGACG"
(seqs <- gb_sequence_get(id = c('demo_1', 'demo_2')))
#> demo_1 demo_2
#> "AGTTGAGACG" "AAATCTAGAA"
(fasta_dnabin <- gb_sequence_get(id = 'demo_1', dnabin = TRUE))
#> 1 DNA sequence in binary format stored in a list.
#>
#> Sequence length: 10
#>
#> Label:
#> demo_1
#>
#> Base composition:
#> a c g t
#> 0.3 0.1 0.4 0.2
#> (Total: 10 bases)
# delete demo after example
db_delete(everything = TRUE)
