-
Notifications
You must be signed in to change notification settings - Fork 9
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
error in getHeader() #26
Comments
I can reproduce this. I think I have a fix and will release a new version shortly, just need to make sure to test! |
@lidaof Ok I have made two changes that should fix this, mostly with regards to compatibility with the browser's native fetch. If you want to try updating to @gmod/bam@1.0.18 to give it a shot that would be great! |
hi @cmdcolin thanks for fast fix, i can confirm if it's bamUrl, it's fixed. if use a bamPath, a new error raised :) |
I think you can't use bamPath in the browser as that tries to access the filesystem directly via node.js file system calls and this does not exist in the browser. If you want to access for example a file that a user opened in the browser, you might want to use the BlobFile class in https://github.com/GMOD/generic-filehandle and pass it to the bamFilehandle/baiFilehandle argument. The bamPath/bamUrl are just convenience methods for using the generic-filehandle class directly |
Note that some of your earlier comments about this topic of opening files actually motivated the creation of generic-filehandle so I hope it is useful :) feel free to provide feedback |
It's designed hopefully to be usable across multiple modules such as cram-js, bam-js, bbi-js, tabix-js, etc. |
oh...yeah..stupid me....what i was thinking using local path in browser....sorry! |
Hi Colin,
Trying use the getHeader() function but get following error:
my code is like:
can you suggest how to fix this? Thanks.
The text was updated successfully, but these errors were encountered: