-
Notifications
You must be signed in to change notification settings - Fork 95
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
problem with to_hdf5() #689
Comments
The expectation is that taxonomy is a 09:57:08 (daniel@sandbar):~/Downloads> t = load_table('test.txt')
09:57:21 (daniel@sandbar):~/Downloads> md = {i: {'taxonomy': [d['taxonomy']]} for i, d in zip(t.ids(axis='observation'), t.metadata(axis='observation'))}
09:57:31 (daniel@sandbar):~/Downloads> t.add_metadata(md, axis='observation')
09:57:39 (daniel@sandbar):~/Downloads> f = h5py.File('baz.txt', 'w')
09:57:46 (daniel@sandbar):~/Downloads> t.to_hdf5(f, 'asd')
09:57:52 (daniel@sandbar):~/Downloads> f.close() |
Cool. That explains it :) Thanks! On Fri, Jan 29, 2016 at 9:58 AM, Daniel McDonald notifications@github.com
|
Sure, are you able to issue a PR? On Fri, Jan 29, 2016 at 7:03 PM, amnona notifications@github.com wrote:
|
When trying to save a biom table with observation metadata, i get the following error:
This problem does not happen without the metadata added to the biom table.
The metadata is added using:
table.add_metadata(taxdict,axis='observation')
where taxdict is of the form:
taxdict[OBSID]={'taxonomy': 'unknown'}
note that to_json() works fine with this table, but later get the same error if try to convert this json file to hdf5.
Attached is the json file
test.txt
The text was updated successfully, but these errors were encountered: