Good morning.
I have a feature table in the .txt format, and I'm trying to convert it to JSON .biom format using the biom-format
package.
biom convert -i featured_converted.txt -o OTU.biom --to-json \
--process-obs-metadata sc_separated --table-type "OTU table"
And I get this error:
Traceback (most recent call last):
File "/Users/bris469/miniconda3/envs/hundo-dev/bin/biom", line 11, in <module>
sys.exit(cli())
File "/Users/bris469/miniconda3/envs/hundo-dev/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/Users/bris469/miniconda3/envs/hundo-dev/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/Users/bris469/miniconda3/envs/hundo-dev/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/bris469/miniconda3/envs/hundo-dev/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/bris469/miniconda3/envs/hundo-dev/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/Users/bris469/miniconda3/envs/hundo-dev/lib/python3.6/site-packages/biom/cli/table_converter.py", line 129, in convert
table_type, process_obs_metadata, tsv_metadata_formatter)
File "/Users/bris469/miniconda3/envs/hundo-dev/lib/python3.6/site-packages/biom/cli/table_converter.py", line 207, in _convert
write_biom_table(result, fmt, output_filepath)
File "/Users/bris469/miniconda3/envs/hundo-dev/lib/python3.6/site-packages/biom/cli/util.py", line 26, in write_biom_table
f.write(table.to_json(biom.parse.generatedby()))
File "/Users/bris469/miniconda3/envs/hundo-dev/lib/python3.6/site-packages/biom/table.py", line 4278, in to_json
raise TableException("Unsupported matrix data type.")
biom.exception.TableException: Unsupported matrix data type.
And here's my .txt feature table.
featured_converted.txt (11.9 KB)
Colin
ben
(benjamin w.)
May 29, 2019, 7:09pm
3
missing --to-json modifier?
biom convert -i ~/featured_converted.txt -o ~/featured_converted.biom --process-obs-metadata sc_separated --table-type "OTU table" --to-json
featured_converted.biom (20.0 KB)
Thanks Ben.
It’s still not working for me… I wonder if it’s due to OSX or something else in my conda environment.
Github issue: https://github.com/biocore/biom-format/issues/816
Here’s my conda list
# packages in environment at /Users/bris469/miniconda3/envs/hundo-dev:
#
# Name Version Build Channel
aioeasywebdav 2.4.0 py36_1000 conda-forge
aiohttp 3.5.4 py36h1de35cc_0 conda-forge
appdirs 1.4.3 py_1 conda-forge
asn1crypto 0.24.0 py36_1003 conda-forge
async-timeout 3.0.1 py_1000 conda-forge
attrs 19.1.0 py_0 conda-forge
bbmap 37.17 1 bioconda
bcrypt 3.1.4 py36h470a237_0 conda-forge
biom-format 2.1.6 py36h7eb728f_0 conda-forge
biopython 1.73 py36h1de35cc_0 conda-forge
blast 2.6.0 boost1.64_2 bioconda
boto3 1.9.137 py_0 conda-forge
botocore 1.12.137 py_0 conda-forge
bzip2 1.0.6 h1de35cc_1002 conda-forge
ca-certificates 2019.3.9 hecc5488_0 conda-forge
cachetools 2.1.0 py_0 conda-forge
certifi 2019.3.9 py36_0 conda-forge
cffi 1.12.3 py36hccf1714_0 conda-forge
chardet 3.0.4 py36_1003 conda-forge
click 7.0 py_0 conda-forge
configargparse 0.13.0 py_1 conda-forge
cryptography 2.6.1 py36h212c5bf_0 conda-forge
datrie 0.7.1 py36h1de35cc_0 conda-forge
decorator 4.4.0 py_0 conda-forge
docutils 0.14 py36_1001 conda-forge
dropbox 9.2.0 py_0 conda-forge
fasttree 2.1.10 h1de35cc_3 bioconda
filechunkio 1.8 py_2 conda-forge
freetype 2.10.0 h24853df_0 conda-forge
ftputil 3.4 py_0 conda-forge
future 0.17.1 py36_1000 conda-forge
gitdb2 2.0.5 py_0 conda-forge
gitpython 2.1.11 py_0 conda-forge
google-api-core 1.11.0 py36_0 conda-forge
google-auth 1.6.3 py_0 conda-forge
google-cloud-core 0.29.1 py_0 conda-forge
google-cloud-storage 1.15.0 py_0 conda-forge
google-resumable-media 0.3.2 py_0 conda-forge
googleapis-common-protos 1.5.9 1 conda-forge
graphviz 2.38.0 hc6cc99f_1011 conda-forge
hundo 1.3.0 pypi_0 pypi
idna 2.8 py36_1000 conda-forge
idna_ssl 1.1.0 py36_1000 conda-forge
jinja2 2.10.1 py_0 conda-forge
jmespath 0.9.4 py_0 conda-forge
jpeg 9c h1de35cc_1001 conda-forge
jsonschema 3.0.1 py36_0 conda-forge
libblas 3.8.0 7_openblas conda-forge
libcblas 3.8.0 7_openblas conda-forge
libcxx 8.0.0 2 conda-forge
libcxxabi 8.0.0 2 conda-forge
libffi 3.2.1 h6de7cb9_1006 conda-forge
libgfortran 3.0.1 0 conda-forge
liblapack 3.8.0 7_openblas conda-forge
libpng 1.6.37 h2573ce8_0 conda-forge
libprotobuf 3.7.1 hfbae3c0_0 conda-forge
libtiff 4.0.10 h79f4b77_1001 conda-forge
mafft 7.313 1 bioconda
markupsafe 1.1.1 py36h1de35cc_0 conda-forge
multidict 4.5.2 py36h1de35cc_1000 conda-forge
ncurses 6.1 h0a44026_1002 conda-forge
networkx 2.3 py_0 conda-forge
numpy 1.16.4 py36h6b0580a_0 conda-forge
openblas 0.3.5 h436c29b_1001 conda-forge
openjdk 11.0.1 h01d97ff_1016 conda-forge
openssl 1.1.1b h01d97ff_2 conda-forge
pandas 0.24.2 py36h86efe34_0 conda-forge
paramiko 2.4.2 py36_1000 conda-forge
pip 19.1 py36_0 conda-forge
prettytable 0.7.2 py_2 conda-forge
protobuf 3.7.1 py36h6de7cb9_0 conda-forge
psutil 5.6.2 py36h01d97ff_0 conda-forge
pyasn1 0.4.4 py_1 conda-forge
pyasn1-modules 0.2.4 py_0 conda-forge
pycparser 2.19 py36_1 conda-forge
pygraphviz 1.5 py36h1de35cc_1000 conda-forge
pynacl 1.3.0 py36h1de35cc_1000 conda-forge
pyopenssl 19.0.0 py36_0 conda-forge
pyrsistent 0.15.2 py36h01d97ff_0 conda-forge
pysftp 0.2.9 py_1 conda-forge
pysocks 1.7.0 py36_0 conda-forge
python 3.6.7 h8dc6b48_1004 conda-forge
python-dateutil 2.8.0 py_0 conda-forge
python-irodsclient 0.7.0 py_0 conda-forge
pytz 2019.1 py_0 conda-forge
pyyaml 5.1 py36h1de35cc_0 conda-forge
ratelimiter 1.2.0 py36_1000 conda-forge
readline 7.0 hcfe32e1_1001 conda-forge
requests 2.22.0 py36_0 conda-forge
rsa 3.4.2 py_1 conda-forge
s3transfer 0.2.0 py36_0 conda-forge
scipy 1.3.0 py36hab3da7d_0 conda-forge
setuptools 41.0.1 py36_0 conda-forge
six 1.12.0 py36_1000 conda-forge
smmap2 2.0.5 py_0 conda-forge
snakemake 5.4.5 0 bioconda
snakemake-minimal 5.4.5 py_0 bioconda
sqlite 3.26.0 h1765d9f_1001 conda-forge
tk 8.6.9 ha441bb4_1001 conda-forge
typing_extensions 3.7.2 py36_1001 conda-forge
urllib3 1.24.3 py36_0 conda-forge
vsearch 2.13.4 hacce2fa_4 bioconda
wheel 0.33.4 py36_0 conda-forge
wrapt 1.11.1 py36h01d97ff_0 conda-forge
xmlrunner 1.7.7 py_0 conda-forge
xz 5.2.4 h1de35cc_1001 conda-forge
yaml 0.1.7 h1de35cc_1001 conda-forge
yarl 1.3.0 py36h1de35cc_1000 conda-forge
zlib 1.2.11 h1de35cc_1004 conda-forge
ben
(benjamin w.)
May 29, 2019, 7:14pm
5
Weird, I’m simply running a biom convert built into a QIIME1.9.1 conda environment.
Name Version Build Channel
appnope 0.1.0 py27_0
backports 1.0 py27_0
biom-format 2.1.5 py27_3 bioconda
burrito 0.9.1 py27_0 bioconda
burrito-fillings 0.1.1 py27_0 bioconda
click 6.6 py27_0 bioconda
cogent 1.5.3 py27_0 bioconda
decorator 4.0.10 py27_1
emperor 0.9.51 py27_0 bioconda
enum34 1.1.6 py27_0
freetype 2.5.5 1
funcsigs 1.0.2 py27_0
future 0.16.0 py27_0
gdata 2.0.18 py27_0
get_terminal_size 1.0.0 py27_0
h5py 2.6.0 np110py27_1
hdf5 1.8.16 0
ipython 5.1.0 py27_1
ipython_genutils 0.1.0 py27_0
libpng 1.6.17 0
matplotlib 1.4.3 np110py27_3
mkl 11.3.3 0
mock 2.0.0 py27_0
natsort 3.5.0 py27_0
nose 1.3.7 py27_1
numpy 1.10.4 py27_2
openssl 1.0.2j 0
pandas 0.18.1 np110py27_0
path.py 9.0.1 py27_0
pathlib2 2.1.0 py27_0
pbr 1.10.0 py27_0
pexpect 4.0.1 py27_0
pickleshare 0.7.4 py27_0
pip 9.0.1 py27_1
prompt_toolkit 1.0.9 py27_0
ptyprocess 0.5.1 py27_0
pygments 2.1.3 py27_0
pynast 1.2.2 py27_0 bioconda
pyparsing 2.0.3 py27_0
pyqi 0.3.2 py27_0 bioconda
pyqt 4.11.4 py27_4
python 2.7.13 0
python-dateutil 2.3 py27_0 bioconda
pytz 2016.10 py27_0
qcli 0.1.1 py27_0 bioconda
qiime 1.9.1 np110py27_0 bioconda
qiime-default-reference 0.1.3 py27_0 bioconda
qt 4.8.7 4
readline 6.2 2
scikit-bio 0.2.3 np110py27_0 bioconda
scipy 0.17.1 np110py27_1
setuptools 27.2.0 py27_0
simplegeneric 0.8.1 py27_1
sip 4.18 py27_0
six 1.10.0 py27_0
sqlite 3.13.0 0
tk 8.5.18 0
traitlets 4.3.1 py27_0
wcwidth 0.1.7 py27_0
wheel 0.29.0 py27_0
zlib 1.2.8 3
Thanks for working through this with me.
Strange! We have a mystery
I’ve just updated my biom-format but it didn’t seem to help…
biom-format 2.1.6-py36h7eb728f_0 --> 2.1.7-py36h917ab60_1002
Colin
1 Like
ben
(benjamin w.)
May 30, 2019, 2:22am
8
I just forgot, but when I ran it with your code, it asked for a biom format, that’s why I put in the -json modifier. So, it ran, I did not get the same error. Maybe just update your environment all together and see if ti gets ride of the error? Ben