Return the sequence(s) for a record(s) from the accession ID(s).
Arguments
- id
character, sequence accession ID(s)
- dnabin
Logical vector of length 1; should the sequences be returned using the bit-level coding scheme of the ape package? Default FALSE.
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/RtmpTAsqCl/restez'
#> ... Creating '/tmp/RtmpTAsqCl/restez/downloads'
demo_db_create(n = 5)
(seq <- gb_sequence_get(id = 'demo_1'))
#> demo_1
#> "TTCCAATACA"
(seqs <- gb_sequence_get(id = c('demo_1', 'demo_2')))
#> demo_1 demo_2
#> "TTCCAATACA" "AACGGTAAAT"
(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.4 0.3 0.0 0.3
#> (Total: 10 bases)
# delete demo after example
db_delete(everything = TRUE)