Error in Read16SAbundDataMeta()

Hi,
I have installed the MicrobiomeAnalystR (R version 4.3.1) using the

devtools::install_github("xia-lab/MicrobiomeAnalystR", build = TRUE, build_opts = c("--no-resave-data", "--no-manual"))

Now when i run the the following code as suggested to check if everything is working or not?

> mbSet <- Init.mbSetObj()
[1] "Init MicrobiomeAnalyst!"
> mbSet <- Init.DataMeta(mbSet, F)
> mbSet <- SetModuleType(mbSet, "meta")
> mbSet<-Read16SAbundDataMeta(mbSet, "data2.csv","text","GreengenesID","F","false")
Error in mbSetObj$dataSet : $ operator is invalid for atomic vectors

Why i m getting this error? Whats the solution ?

Best wishes,
Sumeet

Hello, could you please check if you have successfully Init.DataMeta ?

The mbset should be a list. Usually this message suggest the failure of previous steps which make the mbset to -1.
If mbset hasn’t been initialize successfully, please make sure you have all the related packages installed and use the correct file path.
If you have more questions, please provide us the required information following our post guideline for further trouble shooting.

Hope this helps!

Thank you for the reply. But i re-install everything and even checked Init.DataMeta. Everything seems to be working.

  1. When i load the package:

library(MicrobiomeAnalystR)
Loading required package: phyloseq
There were 32 warnings (use warnings() to see them)
warnings()
Warning messages:
1: replacing previous import ‘MASS::area’ by ‘genefilter::area’ when loading ‘MicrobiomeAnalystR’
2: replacing previous import ‘ape::ring’ by ‘igraph::ring’ when loading ‘MicrobiomeAnalystR’
3: replacing previous import ‘ape::edges’ by ‘igraph::edges’ when loading ‘MicrobiomeAnalystR’
4: replacing previous import ‘ape::mst’ by ‘igraph::mst’ when loading ‘MicrobiomeAnalystR’
5: replacing previous import ‘ape::degree’ by ‘igraph::degree’ when loading ‘MicrobiomeAnalystR’
6: replacing previous import ‘ape::complement’ by ‘metacoder::complement’ when loading ‘MicrobiomeAnalystR’
7: replacing previous import ‘igraph::hierarchy’ by ‘metacoder::hierarchy’ when loading ‘MicrobiomeAnalystR’
8: replacing previous import ‘ggplot2::map_data’ by ‘metacoder::map_data’ when loading ‘MicrobiomeAnalystR’
9: replacing previous import ‘edgeR::calcNormFactors’ by ‘metagenomeSeq::calcNormFactors’ when loading ‘MicrobiomeAnalystR’
10: replacing previous import ‘metacoder::filter_taxa’ by ‘phyloseq::filter_taxa’ when loading ‘MicrobiomeAnalystR’
11: replacing previous import ‘ggplot2::margin’ by ‘randomForest::margin’ when loading ‘MicrobiomeAnalystR’
12: replacing previous import ‘gridExtra::combine’ by ‘randomForest::combine’ when loading ‘MicrobiomeAnalystR’
13: replacing previous import ‘data.table::melt’ by ‘reshape::melt’ when loading ‘MicrobiomeAnalystR’
14: replacing previous import ‘metacoder::is_root’ by ‘taxa::is_root’ when loading ‘MicrobiomeAnalystR’
15: replacing previous import ‘metacoder::is_stem’ by ‘taxa::is_stem’ when loading ‘MicrobiomeAnalystR’
16: replacing previous import ‘igraph::as_data_frame’ by ‘taxa::as_data_frame’ when loading ‘MicrobiomeAnalystR’
17: replacing previous import ‘metacoder::n_subtaxa’ by ‘taxa::n_subtaxa’ when loading ‘MicrobiomeAnalystR’
18: replacing previous import ‘metacoder::is_internode’ by ‘taxa::is_internode’ when loading ‘MicrobiomeAnalystR’
19: replacing previous import ‘metacoder::taxon’ by ‘taxa::taxon’ when loading ‘MicrobiomeAnalystR’
20: replacing previous import ‘metacoder::internodes’ by ‘taxa::internodes’ when loading ‘MicrobiomeAnalystR’
21: replacing previous import ‘metacoder::taxon_id’ by ‘taxa::taxon_id’ when loading ‘MicrobiomeAnalystR’
22: replacing previous import ‘metacoder::subtaxa’ by ‘taxa::subtaxa’ when loading ‘MicrobiomeAnalystR’
23: replacing previous import ‘metacoder::n_supertaxa’ by ‘taxa::n_supertaxa’ when loading ‘MicrobiomeAnalystR’
24: replacing previous import ‘metacoder::taxon_rank’ by ‘taxa::taxon_rank’ when loading ‘MicrobiomeAnalystR’
25: replacing previous import ‘metacoder::stems’ by ‘taxa::stems’ when loading ‘MicrobiomeAnalystR’
26: replacing previous import ‘metacoder::leaves’ by ‘taxa::leaves’ when loading ‘MicrobiomeAnalystR’
27: replacing previous import ‘metacoder::n_leaves’ by ‘taxa::n_leaves’ when loading ‘MicrobiomeAnalystR’
28: replacing previous import ‘metacoder::roots’ by ‘taxa::roots’ when loading ‘MicrobiomeAnalystR’
29: replacing previous import ‘metacoder::taxonomy’ by ‘taxa::taxonomy’ when loading ‘MicrobiomeAnalystR’
30: replacing previous import ‘metacoder::supertaxa’ by ‘taxa::supertaxa’ when loading ‘MicrobiomeAnalystR’
31: replacing previous import ‘metacoder::is_leaf’ by ‘taxa::is_leaf’ when loading ‘MicrobiomeAnalystR’
32: replacing previous import ‘igraph::diversity’ by ‘vegan::diversity’ when loading ‘MicrobiomeAnalystR’`

  1. Later When the object is Initiated using Init.mbSetObj()
mbSet <- Init.mbSetObj()
[1] "Init MicrobiomeAnalyst!"`
3. mbSet <- Init.DataMeta(mbSet, F)
Now the mbSet is structured like this
`>mbSet
$dataSet
list()

$analSet
list()

$imgSet
list()

$is.ASV
[1] FALSE

$poor.replicate
[1] FALSE

$tree.uploaded
[1] FALSE

$cmdSet
character(0)

$dataSets
list()

$mdata.all
list()

> mbSet <- SetModuleType(mbSet, "meta")
>mbSet<-Read16SAbundDataMeta(mbSet, "data2.csv","text","GreengenesID","F","false")

Also enclosed is the input data used to test and the session info.
Session Info

Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.6 LTS

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;  LAPACK version 3.7.1

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

time zone: Europe/London
tzcode source: system (glibc)

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

other attached packages:
[1] ggplot2_3.4.3          Cairo_1.6-1            MicrobiomeAnalystR_2.0
[4] phyloseq_1.44.0       

loaded via a namespace (and not attached):
  [1] Wrench_1.18.0               DBI_1.1.3                  
  [3] bitops_1.0-7                gridExtra_2.3              
  [5] metacoder_0.3.6             permute_0.9-7              
  [7] rlang_1.1.1                 magrittr_2.0.3             
  [9] ade4_1.7-22                 matrixStats_1.0.0          
 [11] compiler_4.3.1              RSQLite_2.3.1              
 [13] mgcv_1.9-0                  png_0.1-8                  
 [15] vctrs_0.6.3                 reshape2_1.4.4             
 [17] stringr_1.5.0               shape_1.4.6                
 [19] pkgconfig_2.0.3             crayon_1.5.2               
 [21] fastmap_1.1.1               XVector_0.40.0             
 [23] caTools_1.18.2              utf8_1.2.3                 
 [25] ggfortify_0.4.16            purrr_1.0.2                
 [27] bit_4.0.5                   glmnet_4.1-8               
 [29] randomForest_4.7-1.1        zlibbioc_1.46.0            
 [31] cachem_1.0.8                GenomeInfoDb_1.36.3        
 [33] jsonlite_1.8.7              biomformat_1.28.0          
 [35] blob_1.2.4                  reshape_0.8.9              
 [37] rhdf5filters_1.12.1         DelayedArray_0.26.7        
 [39] Rhdf5lib_1.22.1             BiocParallel_1.34.2        
 [41] parallel_4.3.1              cluster_2.1.4              
 [43] R6_2.5.1                    stringi_1.7.12             
 [45] RColorBrewer_1.1-3          qs_0.25.5                  
 [47] limma_3.56.2                genefilter_1.82.1          
 [49] GenomicRanges_1.52.0        Rcpp_1.0.11                
 [51] SummarizedExperiment_1.30.2 iterators_1.0.14           
 [53] taxa_0.4.2                  IRanges_2.34.1             
 [55] Matrix_1.6-1.1              splines_4.3.1              
 [57] igraph_1.5.1                tidyselect_1.2.0           
 [59] viridis_0.6.4               abind_1.4-5                
 [61] stringfish_0.15.8           vegan_2.6-4                
 [63] gplots_3.1.3                codetools_0.2-19           
 [65] lattice_0.21-8              tibble_3.2.1               
 [67] plyr_1.8.8                  withr_2.5.1                
 [69] Biobase_2.60.0              KEGGREST_1.40.0            
 [71] survival_3.5-7              RcppParallel_5.1.7         
 [73] Biostrings_2.68.1           pillar_1.9.0               
 [75] MatrixGenerics_1.12.3       KernSmooth_2.23-22         
 [77] foreach_1.5.2               stats4_4.3.1               
 [79] generics_0.1.3              RCurl_1.98-1.12            
 [81] S4Vectors_0.38.2            munsell_0.5.0              
 [83] scales_1.2.1                RApiSerialize_0.1.2        
 [85] gtools_3.9.4                xtable_1.8-4               
 [87] glue_1.6.2                  ppcor_1.1                  
 [89] pheatmap_1.0.12             tools_4.3.1                
 [91] data.table_1.14.8           annotate_1.78.0            
 [93] locfit_1.5-9.8              XML_3.99-0.14              
 [95] rhdf5_2.44.0                grid_4.3.1                 
 [97] tidyr_1.3.0                 ape_5.7-1                  
 [99] AnnotationDbi_1.62.2        edgeR_3.42.4               
[101] colorspace_2.1-0            nlme_3.1-163               
[103] GenomeInfoDbData_1.2.10     Tax4Fun_0.3.1              
[105] cli_3.6.1                   metagenomeSeq_1.42.0       
[107] fansi_1.0.4                 viridisLite_0.4.2          
[109] S4Arrays_1.0.6              dplyr_1.1.3                
[111] gtable_0.3.4                DESeq2_1.40.2              
[113] digest_0.6.33               BiocGenerics_0.46.0        
[115] memoise_2.0.1               multtest_2.56.0            
[117] lifecycle_1.0.3             httr_1.4.7                 
[119] bit64_4.0.5                 MASS_7.3-60

data2.csv (48.0 KB)