joey711 / phyloseq

phyloseq is a set of classes, wrappers, and tools (in R) to make it easier to import, store, and analyze phylogenetic sequencing data; and to reproducibly share that data and analysis with others. See the phyloseq front page:
http://joey711.github.io/phyloseq/
571 stars 187 forks source link

Import Earth Microbiome Project .biom file in R #1206

Open carolinebrunel opened 4 years ago

carolinebrunel commented 4 years ago

Hi Joey711,

Hope my message is in the right place, it's not directly a phyloseq problem but I think this may be of interest for other phyloseq users, and that at least, someone reading these posts can help. I want to import a .biom file in R that I've dowloaded from the ftp server - the Earth Microbiome Project (release 1).

The file comes from the following link: ftp://ftp.microbio.me/emp/release1/otu_tables/closed_ref_silva/ I tried with several of these files but the one I want to import in R (studio) is the first one: 'emp_cr_silva_16S_123.qc_filtered.biom' (293MB)

I've tried several things:

I tried to open it with both the phyloseq::import_biome and the bioformat::read_biom functions :

emp<-read_biom(biom.file)

I got the following Error message:

E:/Path/to/my/data/EMP_data/emp_cr_silva_16S_123.qc_filtered.biom
either as JSON (BIOM-v1) or HDF5 (BIOM-v2).
Check file path, file name, file itself, then try again.

I then checked the file path and name with the is_file function of the 'fs' package. The file path and names are OK.

So I checked the .biom file I want to import by openning it with Notepad, and it shows strange characters (really sorry but I am not familiar with develloping) such as:

ƒOB§ß;}]0v(ÿQ<ãï8 #OÅ+q8‚´'Ž;º‹ë®Ü-¯§-‡ùP

I had a look at other .biom files I have but none of them look like this. I try to open these other files with the same function and it works.

I tried to obtain this file from other repositories (https://zenodo.org/record/890000) but have a similar problem.

The problem most likely comes from the file format but I don't know how to deal with this. Has anyone been subjected to a similar problem? I am familiar with the dada2 pipeline but not with qiime/biom format. I have been through the different vignettes and websites but have'n seen similar problems. Hope someone can help with this.

Thanks in advanced

Running under: Windows >= 8 x64 (build 9200)
Matrix products: default

locale:

[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:

[1] stats     graphics  grDevices utils     datasets  methods   base     
other attached packages:
[1] biomformat_1.8.0 phyloseq_1.24.2  fs_1.3.1        

loaded via a namespace (and not attached):

 [1] Rcpp_1.0.2          bindr_0.1.1         compiler_3.5.0      pillar_1.4.2       
 [5] plyr_1.8.4          XVector_0.20.0      iterators_1.0.9     tools_3.5.0        
 [9] zlibbioc_1.26.0     jsonlite_1.6        tibble_2.1.3        nlme_3.1-137       
[13] rhdf5_2.24.0        gtable_0.2.0        lattice_0.20-35     mgcv_1.8-24        
[17] pkgconfig_2.0.2     rlang_0.4.0         igraph_1.2.4.1      Matrix_1.2-14      
[21] foreach_1.4.4       rstudioapi_0.10     yaml_2.1.19         parallel_3.5.0     
[25] bindrcpp_0.2.2      dplyr_0.7.6         stringr_1.3.1       cluster_2.0.7-1    
[29] Biostrings_2.48.0   S4Vectors_0.20.1    IRanges_2.14.10     multtest_2.36.0    
[33] tidyselect_0.2.5    stats4_3.5.0        ade4_1.7-11         grid_3.5.0         
[37] glue_1.3.1          Biobase_2.40.0      data.table_1.12.2   R6_2.4.0           
[41] survival_2.42-3     purrr_0.2.5         reshape2_1.4.3      Rhdf5lib_1.2.1     
[45] ggplot2_3.2.0       magrittr_1.5        splines_3.5.0       scales_1.0.0       
[49] codetools_0.2-15    MASS_7.3-50         BiocGenerics_0.26.0 assertthat_0.2.0   
[53] permute_0.9-4       ape_5.1             colorspace_1.4-1    stringi_1.1.7      
[57] lazyeval_0.2.1      munsell_0.5.0       vegan_2.5-5         crayon_1.3.4
padpadpadpad commented 1 year ago

Hi @joey711 and @carolinebrunel . Did you ever sort this? I have worked out that some files do work (i.e. emp_cr_silva_16S_123.subset_2k.rare_10000.biom, but I am having exactly the same problem as you.