biocore / qiime

Official QIIME 1 software repository. QIIME 2 (https://qiime2.org) has succeeded QIIME 1 as of January 2018.
GNU General Public License v2.0
286 stars 266 forks source link

Replace qiime.util.DistanceMatrix class #829

Closed jairideout closed 10 years ago

jairideout commented 11 years ago

As part of QIIME's stable API, qiime.util.DistanceMatrix needs to be replaced with something better. It should subclass a numpy array (need to determine which one) in order to easily replace the existing DistanceMatrix class and the more common (labels, dm) tuple used throughout QIIME. This will be a dense matrix.

jairideout commented 11 years ago

Should follow this guide for subclassing numpy arrays.

jairideout commented 11 years ago

After doing a bit of research, I have some design and implementation decisions I'd like to get input on.

There are a number of routes we could take:

I'm leaning toward the third option because it is simple and will easily integrate with the QIIME codebase. However, I think the first option may also be viable, though I'm not sure how best to handle view casting and "new from template" (e.g. slicing) operations. Thoughts?

jairideout commented 10 years ago

The new DistanceMatrix class was just merged into bipy (https://github.com/biocore/bipy/pull/42), so once bipy becomes a QIIME dependency, we can start updating the code to use it for 1.9.0.