pdb.annotate error: replacement has x rows, data has y

Issue #874 new
Franziska Heydenreich created an issue

I'm trying to annotate a set of a few hundred pdbs. pdb.annotate() works fine for a subset of the list only, for selected pdb.ids I'm getting an error. I downloaded and attached the development version of bio3d.

Here's an example for a pdb.id that doesn’t work for me:
test <- pdb.annotate("5TOK_D")

Error in $<-.data.frame(*tmp*, "source", value = c("Human orthopneumovirus", : replacement has 9 rows, data has 6

If you could let me know what's wrong here that would be great! Many thanks in advance!

sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.2.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] bio3d_2.4-3.9000 RCurl_1.98-1.6 ggrepel_0.9.1 kableExtra_1.3.4 patchwork_1.1.1 forcats_0.5.1 stringr_1.4.0
[8] dplyr_1.0.8 purrr_0.3.4 readr_2.1.2 tidyr_1.2.0 tibble_3.1.6 ggplot2_3.3.5 tidyverse_1.3.1

loaded via a namespace (and not attached):
[1] Rcpp_1.0.8 svglite_2.1.0 lubridate_1.8.0 assertthat_0.2.1 digest_0.6.29 utf8_1.2.2
[7] R6_2.5.1 cellranger_1.1.0 backports_1.4.1 reprex_2.0.1 evaluate_0.15 httr_1.4.2
[13] pillar_1.7.0 rlang_1.0.2 curl_4.3.2 readxl_1.3.1 rstudioapi_0.13 rmarkdown_2.12
[19] webshot_0.5.2 munsell_0.5.0 broom_0.7.12 compiler_4.1.2 modelr_0.1.8 xfun_0.30
[25] pkgconfig_2.0.3 systemfonts_1.0.4 htmltools_0.5.2 tidyselect_1.1.2 XML_3.99-0.9 fansi_1.0.2
[31] viridisLite_0.4.0 crayon_1.5.0 tzdb_0.2.0 dbplyr_2.1.1 withr_2.5.0 bitops_1.0-7
[37] grid_4.1.2 jsonlite_1.8.0 gtable_0.3.0 lifecycle_1.0.1 DBI_1.1.2 magrittr_2.0.2
[43] scales_1.1.1 cli_3.2.0 stringi_1.7.6 fs_1.5.2 xml2_1.3.3 ellipsis_0.3.2
[49] generics_0.1.2 vctrs_0.3.8 tools_4.1.2 glue_1.6.2 hms_1.1.1 parallel_4.1.2
[55] fastmap_1.1.0 yaml_2.3.5 colorspace_2.0-3 rvest_1.0.2 knitr_1.37 haven_2.4.3

Comments (2)

  1. Xinqiu Yao

    Hi,

    Thanks for catching it! It should be fixed by this commit. Please re-install the development version and try again. A new patch will also be released to CRAN soon.

  2. Log in to comment