Comments (8)
Hi @lidaof
I am glad you are interested in this module! Sorry it is under-documented at the moment. The reason you saw this error is because it was trying to open your url as a "LocalFile" using nodejs functions, which don't exist in the webbrowser
I have published a new version of this module to npm that contains a "url" argument instead of "path" that can be used with remote url files
This module is under active development for use in JBrowse 2 and but I hope it can serve a function for you!
from bbi-js.
Thank you so much for fast response @cmdcolin .
Do you think it will be easy to implement support of accept file Blob as input as well? since you can use web form to 'upload' a local bigwig file.
from bbi-js.
Yes, that should be possible as well. Ideally concept of filehandles should ideally be abstracted into some module. Currently you could make a class that basically implemets a read method like this for the blob file object https://github.com/GMOD/bbi-js/blob/master/src/localFile.ts#L22-L37
This is done in the jbrowse source code using something like this https://github.com/GMOD/jbrowse/blob/master/src/JBrowse/Model/FileBlob.js
Ideally there would be a nice npm module for abstracting this...if you know of one let me know
from bbi-js.
Then essentially you can pass your custom blob filehandle class with new BigWig({ filehandle: yourfilehandle_for_blob })
It should match the interface for this read function instead of the callback method from the FileBlob I listed https://github.com/GMOD/bbi-js/blob/master/src/localFile.ts#L22-L37
from bbi-js.
Thank you @cmdcolin , the links are very helpful. I will do some tests my side see if I could figure it out.
Thanks again.
from bbi-js.
Sounds good. If there is any new issue feel free to open a new thread
from bbi-js.
@lidaof just FYI we are now making this module with common filehandles and it has a concept of a BlobFile https://www.npmjs.com/package/generic-filehandle !
from bbi-js.
Hi @cmdcolin this is very good. Thank you for the hard work!
from bbi-js.
Related Issues (20)
- Guaranteed order of returned results
- Proposal: Use async iterator instead of observable
- Example doc? HOT 10
- pre-compile parser objects for performance HOT 4
- Version parsers HOT 3
- Allow accessing zoom level directly instead of via scale/bpPerScale HOT 1
- Method to enumerate all features in BigBed file
- Use generator to emit data as it is received HOT 1
- Aborting not being caught? HOT 1
- RangeError: Trying to access beyond buffer length HOT 4
- Request: iteration function without allocation HOT 5
- Parse/test names index in bigbed HOT 1
- Possible alternative compression support
- ESM export is commonjs HOT 8
- Possible alternative format support
- Improve caching behavior HOT 2
- Error while parsing a custom-format bigbed file HOT 4
- TypeError: this.ranges.map is not a function HOT 6
- need more doc in readme HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bbi-js.