0

我想在 R 中导入我从 ftp 服务器下载的 .biom 文件 - Earth Microbiome Project (release 1)。

该文件来自以下链接: ftp: //ftp.microbio.me/emp/release1/otu_tables/closed_ref_silva/ 我尝试了其中几个文件,但我想在 R(工作室)中导入的是第一个: 'emp_cr_silva_16S_123.qc_filtered.biom' (293MB)

我尝试了几件事:

  1. 我尝试使用 phyloseq::import_biome 和 bioformat::read_biom 函数打开它:
emp<-import_biom(BIOMfilename = biom.file)

我收到以下错误消息:

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. 然后,我使用“fs”包的 is_file 函数检查了文件路径和名称。

  2. 然后我检查了我要导入的 .biom 文件,用记事本打开这个 .biom 文件显示奇怪的字符(对不起,我不熟悉开发),例如:

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

我查看了我拥有的其他 biom 文件,但没有一个看起来像这样。我尝试使用相同的功能打开这些其他文件并且它可以工作。

我试图从其他存储库(https://zenodo.org/record/890000)获取此文件,但有类似的问题。

问题很可能来自文件格式,但我不知道如何处理。

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 ```
4

1 回答 1

0

.biom 文件已加密、压缩或标记错误,因此我认为您无法以这种方式使用它。可用版本应类似于此处给出的示例:http: //biom-format.org/documentation/format_versions/biom-1.0.html

您可以询问文件的所有者是否可以为您提供正确的版本。

于 2019-08-08T15:57:13.800 回答