Open
Description
Hi,
The docs for gb_fasta_get()
state that the value is NULL when there is no result - meaning the provided ids were unmatched in the database. On the other hand, when there is a mix of matched and unmatched ids, the unmatched ids are silently dropped.
Perhaps the docs might read something akin to "A named vector of fasta sequences for each matched id, unmatched ids are dropped. If no ids are matched then NULL."
library(restez)
restez_path_set(filepath = tempdir())
# ... Creating '/var/tmp/pbs.5176422.cfe/RtmpmK2T97/restez'
# ... Creating '/var/tmp/pbs.5176422.cfe/RtmpmK2T97/restez/downloads'
demo_db_create(n = 5)
(fastas <- gb_fasta_get(id = c('moo', 'foo', 'woo')))
# NULL
(fastas <- gb_fasta_get(id = c('demo_1', 'foo', 'demo_2')))
# demo_1
# ">demo_1.3 A demonstration sequence | id demo_1\nAACGTGACAC\n\n"
# demo_2
# ">demo_2.1 A demonstration sequence | id demo_2\nGTGCTCCCCC\n\n"
# delete demo after example
db_delete(everything = TRUE)
Session info follows...
> sessionInfo()
R version 4.1.3 (2022-03-10)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Rocky Linux 8.9 (Green Obsidian)
Matrix products: default
BLAS/LAPACK: /mnt/modules/bin/R/4.1.3/lib/libopenblasp-r0.3.20.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] reprex_2.1.0 restez_2.1.4.9000
loaded via a namespace (and not attached):
[1] rstudioapi_0.13 knitr_1.46 magrittr_2.0.3 R6_2.5.1
[5] rlang_1.1.3 fastmap_1.1.0 fansi_1.0.3 tools_4.1.3
[9] xfun_0.43 sessioninfo_1.2.2 utf8_1.2.2 cli_3.6.2
[13] DBI_1.2.2 clipr_0.8.0 withr_2.5.0 htmltools_0.5.8.1
[17] yaml_2.3.5 digest_0.6.29 tibble_3.2.1 lifecycle_1.0.4
[21] crayon_1.5.1 processx_3.5.3 callr_3.7.0 duckdb_0.10.0
[25] ps_1.7.0 vctrs_0.6.5 fs_1.5.2 glue_1.6.2
[29] evaluate_0.15 rmarkdown_2.26 compiler_4.1.3 pillar_1.9.0
[33] pkgconfig_2.0.3
Metadata
Metadata
Assignees
Labels
No labels