On Mar 26, 5:28 pm, Sean Davis <[EMAIL PROTECTED]> wrote: > I am working with genomic data. Basically, it consists of many tuples > of (start,end) on a line. I would like to convert these tuples of > (start,end) to a string of bits where a bit is 1 if it is covered by > any of the regions described by the (start,end) tuples and 0 if it is > not. I then want to do set operations on multiple bit strings (AND, > OR, NOT, etc.). Any suggestions on how to (1) set up the bit string > and (2) operate on 1 or more of them? Java has a BitSet class that > keeps this kind of thing pretty clean and high-level, but I haven't > seen anything like it for python. > > Thanks, > Sean
Have you looked at Pypi [1] ? From a quick search, there are at least four potentially relevant packages: BitPacket, BitVector, BitBuffer, BitBucket. George [1] http://pypi.python.org/pypi?%3Aaction=search&term=bit&submit=search -- http://mail.python.org/mailman/listinfo/python-list