-
Notifications
You must be signed in to change notification settings - Fork 6
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
TypeError: this.ranges.map is not a function #59
Comments
if you are able to supply the file you are testing on it may help. i can't reproduce this on my sample file, but don't doubt something could be wrong the ranges code is definitely one of the more legacy parts of the codebase, i didn't try to refactor it at all when refactoring this module out of our jbrowse 1 codebase so would be happy to review/modernize it at some point |
any update? having the file may be easiest if you can send it, feel free to email at colin.diesh@gmail.com |
Hi Colin, Apologies for the delay. We were trying to figure out what was causing the original issue. We found that the files that have the chromosomes sorted lexicographically (i.e., chr1, chr10, chr11) don't have the issue, whereas the ones that have the chromosomes sorted by number (i.e., chr1, chr2, chr3) will show the error. The ones with the error will have multiple values in
and inside the method
example_bigwig_sorted_without_error_small.bw.zip |
thanks for the examples! now that you mention the sorting, I remember that another user ran into this same issue here GMOD/jbrowse-components#4168 |
I published a new version (4.0.4) that appeared to fix the usage for the example file you added. The ranges code was simplified so that it should be less bug prone now. Let me know if that works :) |
Hi Colin, That works! Thanks for the quick response and fix :) |
Hi,
I'm loading a BigWig file and when calling this method as such:
It throws the following error:
I believe it's because the
union
method creates a newRange
with an array as only parameter:And then in the constructor
0 in arg1
is true and an object is created instead of an array:Finally when
getRanges
is called, it tries to callmap
on an object unsuccessfully.I'll keep investigating.
Please let me know if you need more information to reproduce this issue.
The text was updated successfully, but these errors were encountered: