waldronlab / bugsigdbr

R-side access to published microbial signatures from BugSigDB
https://bioconductor.org/packages/bugsigdbr
GNU General Public License v3.0
4 stars 2 forks source link

[BUG] getSignatures can produce signatures < min.size #54

Closed jwokaty closed 6 months ago

jwokaty commented 6 months ago

min.size test fails because sigs <- getSignatures(bsdb, tax.level = "genus", min.size = 3) will produce signatures less than min.size whereas I expect all signatures to be >= min.size.

This should likely be fixed for #49.

Context

Reproducible example

library(bugsigdbr)
bsdb <- importBugSigDB(version = "10.5281/zenodo.10407666")
sigs <- getSignatures(bsdb, tax.level = "genus", min.size = 3)
sigs[lengths(sigs) < 3]

$`bsdb:680/1/1_Response-to-immunochemotherapy:responders-(patients-treated-with-metronomic-dose-of-capecitabine)_vs_non-responders-(patients-treated-with-conventional-dose)_UP`
[1] "158846" "29465"

R session information

Remember to include your full R session information.

> sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.3 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0 
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: America/New_York
tzcode source: system (glibc)

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

other attached packages:
[1] bugsigdbr_1.9.0 testthat_3.2.0 

loaded via a namespace (and not attached):
 [1] generics_0.1.3       utf8_1.2.4           RSQLite_2.3.3        stringi_1.8.2       
 [5] digest_0.6.33        magrittr_2.0.3       blob_1.2.4           pkgload_1.3.3       
 [9] fastmap_1.1.1        rprojroot_2.0.4      processx_3.8.2       pkgbuild_1.4.2      
[13] sessioninfo_1.2.2    brio_1.1.3           DBI_1.1.3            rematch2_2.1.2      
[17] urlchecker_1.0.1     ps_1.7.5             promises_1.2.1       httr_1.4.7          
[21] purrr_1.0.2          fansi_1.0.5          cli_3.6.1            shiny_1.8.0         
[25] diffobj_0.3.5        rlang_1.1.2          crayon_1.5.2         dbplyr_2.4.0        
[29] ellipsis_0.3.2       bit64_4.0.5          remotes_2.4.2.1      withr_2.5.2         
[33] cachem_1.0.8         devtools_2.4.5       parallel_4.3.2       tools_4.3.2         
[37] tzdb_0.4.0           memoise_2.0.1        dplyr_1.1.4          filelock_1.0.2      
[41] httpuv_1.6.12        curl_5.1.0           vctrs_0.6.4          R6_2.5.1            
[45] mime_0.12            lifecycle_1.0.4      BiocFileCache_2.10.1 stringr_1.5.1       
[49] bit_4.0.5            fs_1.6.3             htmlwidgets_1.6.3    vroom_1.6.4         
[53] usethis_2.2.2        miniUI_0.1.1.1       waldo_0.5.2          pkgconfig_2.0.3     
[57] desc_1.4.2           callr_3.7.3          pillar_1.9.0         later_1.3.1         
[61] glue_1.6.2           profvis_0.3.8        Rcpp_1.0.11          tidyselect_1.2.0    
[65] tibble_3.2.1         rstudioapi_0.15.0    xtable_1.8-4         htmltools_0.5.7     
[69] compiler_4.3.2       prettyunits_1.2.0
lgeistlinger commented 6 months ago

Thanks @jwokaty and @LiNk-NY + sorry for my delayed reply. I've been traveling last week with little access to the internet. Also I will be out of office until Jan 05, but will have a look over the course of the next days.