无法打开.biom文件进行Phyloseq树绘图

时间:2017-05-17 10:12:09

标签: r bioinformatics phylogeny

尝试阅读biom文件后:

rich_dense_biom  <-
  system.file("extdata", "D:\sample_otutable.biom", package = "phyloseq")

myData  <-
  import_biom(rich_dense_biom, treefilename, refseqfilename, parseFunction =
                parse_taxonomy_greengenes)

显示以下错误

Error in read_biom(biom_file = BIOMfilename) : 
  Both attempts to read input file:

either as JSON (BIOM-v1) or HDF5 (BIOM-v2).
Check file path, file name, file itself, then try again.

1 个答案:

答案 0 :(得分:0)

你确定 D:\ sample_otutable.biom 确实存在吗?是系统文件吗?

在R for Windows中,使用\\

分隔文件路径至少更安全(如果不是必需的话?)

这对我有用

library("devtools")
install_github("biom", "joey711")
library(biom)

biom.file <-
  "C:\\Users\\Mark Miller\\Documents\\R\\win-library\\3.3\\biom\\extdata\\min_dense_otu_table.biom"

my.data <- import_biom(BIOMfilename = biom.file)