qiime2 / q2-diversity

BSD 3-Clause "New" or "Revised" License
4 stars 45 forks source link

remove step loading phylogeny as skbio.TreeNode #253

Closed gwarmstrong closed 5 years ago

gwarmstrong commented 5 years ago

Improvement Description These lines https://github.com/qiime2/q2-diversity/blob/4c235a003b6ab8ad6cca78935c33365a8903f1af/q2_diversity/_beta/_method.py#L98-L101

Can be removed. It will be slow to load on large trees and this functionality is now exposed in unifrac as of 0.10.0. See: https://github.com/biocore/unifrac/pull/87 , furthermore unifrac>=0.10.0 is required for q2-diversity as of #252 .

Current Behavior beta_phylogenetic loads the phylogeny as a skbio TreeNode to check whether the table is completely represented by the phylogeny. This is behavior is undesirable because it is slow on large trees.

Proposed Behavior This check is performed by unifrac>=0.10.0 and returns the same error message if neccessary. This check was being performed in previous versions of unifrac, but the error message was not exposed to the python API. With a simple deletion of these lines, the error message should be sent appropriately by unifrac eliminating the need for these lines.