Return the sequence(s) for a record(s) from the accession ID(s).
Details
For more information about the dnabin
format, see ape::DNAbin()
.
See also
Other get:
gb_definition_get()
,
gb_fasta_get()
,
gb_organism_get()
,
gb_record_get()
,
gb_version_get()
Examples
library(restez)
restez_path_set(filepath = tempdir())
#> ... Creating '/tmp/RtmpJvhvXj/restez'
#> ... Creating '/tmp/RtmpJvhvXj/restez/downloads'
demo_db_create(n = 5)
(seq <- gb_sequence_get(id = 'demo_1'))
#> demo_1
#> "ATAGTTACCC"
(seqs <- gb_sequence_get(id = c('demo_1', 'demo_2')))
#> demo_1 demo_2
#> "ATAGTTACCC" "AACATTTAAG"
(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.3 0.1 0.3
#> (Total: 10 bases)
# delete demo after example
db_delete(everything = TRUE)