Comments (5)
Interesting. Is sys.maxsize == (2**31 - 1)
on these platforms? We are probably making a bad assumption here:
https://github.com/bxlab/bx-python/blob/master/lib/bx/interval_index_file.py#L126
That should probably be sys.maxsize
. Sanity check @rsharris?
from bx-python.
from bx-python.
@rsharris @jxtx This is keeping the new versions of the package from Debian's testing distribution. Shall we skip these tests, or is there a real bug on the architectures that needs fixing?
Re:
Is
sys.maxsize == (2**31 - 1)
on these platforms?
As @rsharris said, sys.maxsize
is 2**63-1
on amd64, and 2**31-1
on i386, armel, armhf, and mipsel
from bx-python.
( Ignoring the confusion (which might only be mine) about whether BIN_OFFSETS_MAX[0] should be a power of 2. )
My two cents:
What I see is (a) a potential issue with a disagreement in field sizes, and (b) a potential issue of cross-platform portability.
What I mean by field sizes ... fields are written to the file as ">I", but the expectation during design may have been that these were 32 bits. If ">I" is a different size on some platforms there's a potential for bugs. Looking at the code it seems to calculate everything using calcsize(), so maybe this isn't a problem.
If, however, a file is written on a platform with one size ">I" and read on a platform with a different ">I", then obviously the whole thing will fail. I don't know whether those sizes vary on different platforms, but I expect that they would.
It could be there's no intent to support cross-platform portability. If so, it seems like the size of ">I" should be indicated in the file header so that readers could reject files with the wrong ">I" size.
from bx-python.
I made a PR making many of the changes suggested above at #54
from bx-python.
Related Issues (20)
- Incompatible types str and byte under python3 HOT 1
- Wheel for Python 3.8 HOT 2
- StopIteration transformed to RuntimeError on python >= 3.7
- No source tarballs for the release 0.8.8 on the PyPI website HOT 1
- error can't found bx.intervals module
- get on bx.align.maf.MAFIndexedAccess results in wrong alignment blocks HOT 4
- Importing ABC directly from collections was deprecated and will be removed in Python 3.10. Use collections.abc
- time.clock has been removed in Python 3.8
- ImportError: undefined symbol: PyUnicodeUCS2_FromStringAndSize HOT 1
- binned_bitsets_from_list errors when chromosome size is larger than set MAX (512M) HOT 1
- Got wrong positions on chomped query maf subset HOT 2
- How to dealing with maf files compressed with bzip2 or lzop ? HOT 4
- Failed to load seekbzip2 module when dealing with bz2 files HOT 1
- undefined symbol: PyUnicodeUCS2_FromStringAndSize HOT 3
- 0.8.11 Doesn't install some built shared libraries HOT 8
- documentation? HOT 3
- Add support to release linux aarch64 wheels HOT 1
- multiple sequence alignment
- upgrading bx-python to newer versions of python HOT 1
- ERROR Missing dependencies: oldest-supported-numpy HOT 2
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 bx-python.