Problem in importing .biom file from the Earth Microbiome Project (release1) in R

267 Views Asked by At

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:

  1. I tried to open it with both the phyloseq::import_biome and the bioformat::read_biom functions :
emp<-import_biom(BIOMfilename = biom.file)

I got the following Error message:

Both attempts to read input file:
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.
  1. I then checked the file path and name with the is_file function of the 'fs' package.

  2. Then I checked the .biom file I want to import, openning this .biom file with Notepad shows strange characters (sorry but I am not familiar with developing) 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.

Platform: x86_64-w64-mingw32/x64 (64-bit)
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 ```
1

There are 1 best solutions below

1
On

The .biom file is encrypted, complessed or mislabled, so I don't think you will be able to use it this way. A usable version should look like examples given here: http://biom-format.org/documentation/format_versions/biom-1.0.html

You could ask the owners of the file if they could provide you with a correct version.