ChiLiubio / file2meco

Tranform files to the microtable object in microeco package
GNU General Public License v3.0
22 stars 3 forks source link

Phyloseq object to microtable #4

Closed rsiani closed 3 years ago

rsiani commented 3 years ago

Hi, I was trying to convert a phyloseq object to your microtable class, but I run into this error:

> library(microeco)
> meco = phyloseq2meco(phytted)
Error in tax_table_trans %<>% tidy_taxonomy : 
  lazy-load database '/home/rob/R/x86_64-pc-linux-gnu-library/4.0/microeco/R/microeco.rdb' is corrupt
In addition: Warning messages:
1: In tax_table_trans %<>% tidy_taxonomy :
  restarting interrupted promise evaluation
2: In tax_table_trans %<>% tidy_taxonomy :
  internal error -3 in R_decompress1

I tried to reinstall the package microeco package but it did not help. I should add that I had no problem converting the same phyloseq object prior to the latest updates (so when the function phyloseq2meco was still in the main package).

> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: elementary OS 5.1.7 Hera

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so

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

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

other attached packages:
 [1] file2meco_0.1.1             microeco_0.4.1              MicrobiotaProcess_1.2.2    
 [4] doParallel_1.0.16           iterators_1.0.13            foreach_1.5.1              
 [7] nord_1.0.0                  DECIPHER_2.18.1             RSQLite_2.2.7              
[10] Biostrings_2.58.0           XVector_0.30.0              phangorn_2.7.0             
[13] here_1.0.1                  SRS_0.2.2                   shinybusy_0.2.2            
[16] shinycssloaders_1.0.0       DT_0.18                     shiny_1.6.0                
[19] hrbrthemes_0.8.0            patchwork_1.1.1             ggpubr_0.4.0               
[22] DESeq2_1.30.1               SummarizedExperiment_1.20.0 Biobase_2.50.0             
[25] MatrixGenerics_1.2.1        matrixStats_0.59.0          GenomicRanges_1.42.0       
[28] GenomeInfoDb_1.26.7         IRanges_2.24.1              S4Vectors_0.28.1           
[31] BiocGenerics_0.36.1         microbiome_1.12.0           ape_5.5                    
[34] vegan_2.5-7                 lattice_0.20-44             permute_0.9-5              
[37] phyloseq_1.34.0             forcats_0.5.1               stringr_1.4.0              
[40] dplyr_1.0.7                 purrr_0.3.4                 readr_1.4.0                
[43] tidyr_1.1.3                 tibble_3.1.2                ggplot2_3.3.5              
[46] tidyverse_1.3.1             decontam_1.10.0             qiime2R_0.99.35            
[49] devtools_2.4.2              usethis_2.0.1               BiocManager_1.30.16        
[52] pacman_0.5.1               

loaded via a namespace (and not attached):
  [1] bit64_4.0.5            knitr_1.33             multcomp_1.4-17        DelayedArray_0.16.3   
  [5] data.table_1.14.0      rpart_4.1-15           RCurl_1.98-1.3         generics_0.1.0        
  [9] TH.data_1.0-10         callr_3.7.0            cowplot_1.1.1          bit_4.0.4             
 [13] xml2_1.3.2             lubridate_1.7.10       httpuv_1.6.1           ggsci_2.9             
 [17] assertthat_0.2.1       xfun_0.24              hms_1.1.0              evaluate_0.14         
 [21] promises_1.2.0.1       fansi_0.5.0            Rmisc_1.5              dbplyr_2.1.1          
 [25] readxl_1.3.1           igraph_1.2.6           DBI_1.1.1              geneplotter_1.68.0    
 [29] htmlwidgets_1.5.3      reshape_0.8.8          ellipsis_0.3.2         backports_1.2.1       
 [33] annotate_1.68.0        libcoin_1.0-8          vctrs_0.3.8            remotes_2.4.0         
 [37] abind_1.4-5            cachem_1.0.5           withr_2.4.2            checkmate_2.0.0       
 [41] treeio_1.17.0          prettyunits_1.1.1      cluster_2.1.2          lazyeval_0.2.2        
 [45] crayon_1.4.1           genefilter_1.72.1      labeling_0.4.2         pkgconfig_2.0.3       
 [49] zCompositions_1.3.4    nlme_3.1-152           pkgload_1.2.1          nnet_7.3-16           
 [53] rlang_0.4.11           lifecycle_1.0.0        sandwich_3.0-1         extrafontdb_1.0       
 [57] modelr_0.1.8           cellranger_1.1.0       rprojroot_2.0.2        aplot_0.0.6           
 [61] Matrix_1.3-4           carData_3.0-4          Rhdf5lib_1.12.1        zoo_1.8-9             
 [65] reprex_2.0.0           base64enc_0.1-3        processx_3.5.2         png_0.1-7             
 [69] bitops_1.0-7           rhdf5filters_1.2.1     blob_1.2.1             coin_1.4-1            
 [73] jpeg_0.1-8.1           rstatix_0.7.0          ggsignif_0.6.2         scales_1.1.1          
 [77] memoise_2.0.0          magrittr_2.0.1         plyr_1.8.6             zlibbioc_1.36.0       
 [81] compiler_4.0.2         tinytex_0.32           RColorBrewer_1.1-2     ggstar_1.0.2          
 [85] cli_2.5.0              ade4_1.7-17            ps_1.6.0               htmlTable_2.2.1       
 [89] Formula_1.2-4          MASS_7.3-54            mgcv_1.8-36            tidyselect_1.1.1      
 [93] stringi_1.6.2          yaml_2.2.1             locfit_1.5-9.4         ggrepel_0.9.1         
 [97] latticeExtra_0.6-29    grid_4.0.2             fastmatch_1.1-0        tools_4.0.2           
[101] rio_0.5.27             rstudioapi_0.13        foreign_0.8-81         gridExtra_2.3         
[105] farver_2.1.0           Rtsne_0.15             rvcheck_0.1.8          digest_0.6.27         
[109] quadprog_1.5-8         Rcpp_1.0.6             car_3.0-10             broom_0.7.7           
[113] later_1.2.0            httr_1.4.2             gdtools_0.2.3          AnnotationDbi_1.52.0  
[117] colorspace_2.0-2       rvest_1.0.0            XML_3.99-0.6           fs_1.5.0              
[121] truncnorm_1.0-8        splines_4.0.2          tidytree_0.3.4         multtest_2.46.0       
[125] sessioninfo_1.1.1      systemfonts_1.0.2      xtable_1.8-4           ggtree_3.1.0          
[129] jsonlite_1.7.2         modeltools_0.2-23      testthat_3.0.3         R6_2.5.0              
[133] Hmisc_4.5-0            NADA_1.6-1.1           pillar_1.6.1           htmltools_0.5.1.1     
[137] mime_0.10              glue_1.4.2             fastmap_1.1.0          BiocParallel_1.24.1   
[141] codetools_0.2-18       pkgbuild_1.2.0         mvtnorm_1.1-2          utf8_1.2.1            
[145] curl_4.3.1             gtools_3.9.2           zip_2.2.0              openxlsx_4.2.4        
[149] Rttf2pt1_1.3.8         survival_3.2-11        rmarkdown_2.9          desc_1.3.0            
[153] biomformat_1.18.0      munsell_0.5.0          rhdf5_2.34.0           GenomeInfoDbData_1.2.4
[157] haven_2.4.1            reshape2_1.4.4         gtable_0.3.0           extrafont_0.17     
ChiLiubio commented 3 years ago

Hi Could you please try to run the scripts using the example dataset in the file2meco README? I can not make sure where the issue come from now. This seems like the wrong installation of microeco. If failed again, please try to delete the package file manually in the library directory of R installation path. Then install microeco again. Please feel free to tell me if this not work.

Best Chi

rsiani commented 3 years ago

Hi, all great! First trial didn't work, but after manually deleting the folder, I could normally convert phyloseq to microtable. Thanks for the prompt reply and all the best! Let me know in the future if you would need help with your project :)

ManuelAOS commented 2 years ago

Hi, I am facing a similar issue with microeco package. I am trying to convert a phyloseq object into a microeco object, but it fails:

Here is the code:

install.packages("microeco") library(microeco) meco <- phyloseq2meco(king_filt)

Error in phyloseq2meco(king_filt) : could not find function "phyloseq2meco"

Any help would be gladly appreciated :)