hmm, possible to try a quick pathological case? something like gg @ 97%,
and have the tip list going in be all tips minus 1?


On Thu, May 8, 2014 at 2:58 PM, Will Van Treuren
<notifications@github.com>wrote:

> In skbio/core/tree.py:
>
> > +            all_tips = self.subset()
> > +            if not set(tip_subset).issubset(all_tips):
> > +                raise ValueError('tip_subset contains ids that arent tip '
> > +                                 'names.')
> > +
> > +            lca = self.lowest_common_ancestor(tip_subset)
> > +            ancestors = {}
> > +            for tip in tip_subset:
> > +                curr = self.find(tip)
> > +                while curr is not lca:
> > +                    ancestors[curr.name] = curr.length if curr.length is not \
> > +                        None else 0.0
> > +                    curr = curr.parent
> > +            return sum(ancestors.values())
> > +
> > +        else:
>
> I think there is likely a performance benefit here as well. I will work on
> adding the tree array based approach (issue #312<https://github.com/biocore/scikit-bio/issues/312>)
> in the future, but I think this code is fast enough for inclusion now. Not
> urgent for me though, so if you all disagree I will deal with that issue
> first.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/biocore/scikit-bio/pull/309/files#r12452192>
> .
>