[Numpy-discussion] Overlapping ranges

Robert Kern robert.kern at gmail.com
Mon Mar 16 17:29:04 EDT 2009


2009/3/16 Peter Saffrey <pzs at dcs.gla.ac.uk>:

> At the moment, I'm using a fairly naive approach that finds roughly in the
> genome (which gene) each point might be and then checking it against the
> bins in that gene. If I split the problem into chromosomes, I feel sure
> there must be some super-fast matrix approach I can apply using numpy, but
> I'm struggling a bit. Can anybody suggest something?

You probably need something algorithmically better, like interval
trees. There are a couple of C/Python implementations floating around.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco



More information about the NumPy-Discussion mailing list