[Biopython] KDTree with multidimensional radius?
Biopython User
biopyuser at gmail.com
Mon Mar 29 05:16:37 UTC 2010
Hi all -
New to K-D Trees and biopython, and have a question regarding the
feasibility of this setup:
Is it possible to create a 3-D tree of (X,Y,T=time) and do a search (node
count) with a 2-D "radius" of (d,t) where d is the cartesian distance from a
center point (x,y), and t is a temporal distance only on the T=time axis?
The problem class I'm trying to solve is as follows:
Given a set of nodes (possibly as many as 10 million) in (X,Y,T), find all
groups where the group is defined by a central node (x,y,t) and N or more
nodes within d distance and t time from that center.
I've come to the conclusion that I can do this in a two-step process: that
is, first search() on a 2-D (X,Y) tree, and then, for each of the arrays
produced, do a 1-D (T) search - but given that the tree creation cost is
high, this is potentially very inefficient, and I'm hoping there's a better
way.
Ideas/feedback/other options greatly appreciated.
Kurt.
More information about the Biopython
mailing list