<p>How can I import a biom file?</p>
<p>When I run the following code:</p>
<pre><code>library(phyloseq)
import_biom(
    &quot;/Users/name/Dropbox/*****.biom&quot;, 
    parseFunction=parse_taxonomy_greengenes, 
    parallel=F)
</code></pre>
<p>I get the following error message:</p>
<blockquote>
<p>biom either as JSON (BIOM-v1) or HDF5 (BIOM-v2). Check file path, file
name, file itself, then try agai</p>
</blockquote>

CC BY-SA 4.0
2020-09-10T08:43:44.047Z
what happens when you do ``file.exists("/Users/name/Dropbox/*****.bio")``
user438383
CC BY-SA 4.0
2020-09-10T09:37:59.173Z
you can check with `file *****.biom` as well, to check if your biom file is text or HDF5-like file, to distinguish between versions 1 and 2.
zorbax
CC BY-SA 4.0
2020-09-10T12:20:42.427Z
The relevant package for `import_biom` should be added to your code (e.g. `library(phyloseq)`).
Greg
CC BY-SA 4.0
2020-09-10T13:11:34.207Z
Thank you.    file.exists("/Users/name/Dropbox/*****.bio")  [1] TRUE
user224050
CC BY-SA 4.0
2020-09-10T13:12:54.930Z
> to check if your biom file is text or HDF5-like file, to distinguish between versions 1 and 2.
How can I check? If it is version 1, what should I do and if it is version 2, what should I do?
user224050
CC BY-SA 4.0
2020-09-10T17:03:14.787Z
Biological Observation Matrix 1.0.0, so I think this is JSON file.
user224050
<r>
Help importing a biom file into R
# Help importing a biom file into R

(Asked by: username_0 on 2020-09-10)

How can I import a biom file?
When I run the following code:
library(phyloseq)
import_biom(
    "/Users/name/Dropbox/*****.biom", 
    parseFunction=parse_taxonomy_greengenes, 
    parallel=F)

I get the following error message:

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

**Tags:** r
> **Comments:**
> **username_1**: what happens when you do ``file.exists("/Users/name/Dropbox/*****.bio")``  
> **username_2**: you can check with `file *****.biom` as well, to check if your biom file is text or HDF5-like file, to distinguish between versions 1 and 2.  
> **username_3**: The relevant package for `import_biom` should be added to your code (e.g. `library(phyloseq)`).  
> **username_0**: Thank you.    file.exists("/Users/name/Dropbox/*****.bio")  [1] TRUE  
> **username_0**: > to check if your biom file is text or HDF5-like file, to distinguish between versions 1 and 2. How can I check? If it is version 1, what should I do and if it is version 2, what should I do?  
> **username_0**: Biological Observation Matrix 1.0.0, so I think this is JSON file.  

---

## 0 answers

