Skip to content

TreeDistance classes missing "name" attribute #25

@lthiberiol

Description

@lthiberiol

When running tree_data.get_inter_tree_distances('geo') I get the following error message:

AttributeError                            Traceback (most recent call last)
<ipython-input-9-bda3e1eac6e8> in <module>
----> 1 tree_data.get_inter_tree_distances('geo')

~/anaconda3/envs/py38/lib/python3.8/site-packages/treeCl/collection.py in get_inter_tree_distances(self, metric, jobhandler, normalise, min_overlap, overlap_fail_value, batchsize, show_progress)
    452         args = task_interface.scrape_args(trees, normalise, min_overlap, overlap_fail_value)
    453         logger.debug('{}'.format(args))
--> 454         msg = task_interface.name if show_progress else ''
    455         array = jobhandler(task_interface.get_task(), args, msg, batchsize, nargs=binom_coeff(len(trees)))
    456         return DistanceMatrix.from_array(squareform(array), self.names)

AttributeError: 'GeodesicTreeDistance' object has no attribute 'name'

I managed to fix it locally by adding name = 'GeodesicDistance' to line 662 in treeCl/tasks.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions