Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

biom convert to json writes the type as a byte literal #731

Closed
corburn opened this issue Feb 2, 2017 · 1 comment
Closed

biom convert to json writes the type as a byte literal #731

corburn opened this issue Feb 2, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@corburn
Copy link

corburn commented Feb 2, 2017

In python 3, biom convert will write the type as a byte literal. As a result, the type is not recognize by scripts expecting a string literal. This can be reproduced with the biom-format test data where, unlike the data this was encountered in, the id is also written as a byte literal:

biom convert -i  tests/test_data/test.biom -o test.json --to-json

{
  "id": "b'No Table ID'",
  "type": "b'Unspecified'"
  ...
}

Including the table-type flag will replace the byte literal with a string literal.
biom convert -i tests/test_data/test.biom -o test.json --to-json --table-type "OTU table"

System information

     Platform:	linux

Python version: 3.4.2 (default, Oct 8 2014, 10:45:20) [GCC 4.9.1]
Python executable: /biom-format/env/bin/python3

Dependency versions

click version: 6.7
NumPy version: 1.12.0
SciPy version: 0.18.1
h5py version: 2.6.0

biom-format package information

biom-format version: 2.1.5-dev

@wasade
Copy link
Member

wasade commented Feb 2, 2017 via email

wasade added a commit to wasade/biom-format that referenced this issue Feb 2, 2017
wasade added a commit to wasade/biom-format that referenced this issue Feb 2, 2017
@wasade wasade mentioned this issue Feb 2, 2017
@wasade wasade self-assigned this Feb 2, 2017
@wasade wasade added the bug label Feb 2, 2017
@wasade wasade added this to the 2.1.6 milestone Feb 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants