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

Always getting `Cannot get size of BigWig/BigBed file, widest zoom level not available` #1375

Closed
lukaw3d opened this issue Jun 5, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@lukaw3d
Copy link
Contributor

commented Jun 5, 2019

With new http-range-fetcher, bigwig always shows a warning
cannot get size of BigWig/BigBed file, widest zoom level not available

Code

You would probably need to use response.headers['content-range'] in here, not just response.buffer:

_getResponseArrayBuffer(callback,{buffer}) {
if (buffer.buffer) {
const arrayBuffer = buffer.buffer.slice(
buffer.byteOffset, buffer.byteOffset + buffer.byteLength
)
callback(arrayBuffer)
} else throw new Error('could not convert response to ArrayBuffer')
},

  • old code did this:
    this.totalSizes[request.url] = (function() {
    var contentRange = req.getResponseHeader('Content-Range');
    if( ! contentRange )
    return undefined;
    var match = contentRange.match(/\/(\d+)$/);
    return match ? parseInt(match[1]) : undefined;
    })();

Version info

JBrowse version: 1.16.4
Web browser being used: Chrome 75

@cmdcolin

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2019

Thanks for noticing this. I think it should be restored now on a commit to dev branch 5f6c036

@cmdcolin

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2019

Note there is also a fix on dev branch for accessing the smallest zoom level...#1359

Pending release as 1.16.5 hopefully soon (if anyone needs it sooner than later let me know :))

@lukaw3d

This comment has been minimized.

Copy link
Contributor Author

commented Jun 6, 2019

That's a pretty fix

@lukaw3d lukaw3d closed this Jun 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.