-
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
biom javascript module #699
Comments
There is an LLVM->JavaScript library called emscripten which has been used to port things like the Unreal Engine. Most modern browsers now support Typed Arrays so I don't see any reason transpiling HDF5 wouldn't be possible, then from there you could ostensibly implement the BIOM format. But none of that is going to be easy. |
Thanks for the pointer. I will look into that and keep you posted if I make progress. |
I was able to compile the hdf5 library with emscripten (with some difficulties). I'm also able to compile and link example hdf5 programs in c to javascript (both for nodejs and browsers). However hdf5 does not play nicely with the fake file system provided by emscripten. It just refuses to read or write any files (even preloaded ones) with error messages like that:
Currently I see no way of working around this as the hdf5 library depends heavily on files. My idea to work around the problem of not supporting biom2 format natively is the following:
This webservice is called from my javascript module via AJAX if a user provides biom version 2. |
It's a shame HDF5 is so tied the the file-system (and that there is only one reference implementation in C). I think your work-around sounds practical, there isn't much else that can be done without trying to implement HDF5 in JavaScript natively (without transpiling). |
I'm going to close this out as it's not surrounding the Python in-memory object, or the format itself. Please reopen if you disagree. |
I'm planning to write a generic biom module in javascript to allow easy handling of biom data in web applications. Import of biom v1 data into my module is trivial as it is in JSON format. Import of biom v2 data on the other hand is close to impossible (for javascript running in a browser rather than on node.js, for the latter there is https://github.com/HDF-NI/hdf5.node). As the only way to handle HDF5 data properly seems to be wrapping the existing C library I see no way at all to support biom v2.
Do you have any ideas or suggestions on how to add biom v2 support to a javascript module?
Is a javascript module only capable of handling biom v1 data of any use to the community?
Any suggestions are welcome.
The text was updated successfully, but these errors were encountered: