Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'ToyTree' object has no attribute 'get_node_descendant_idxs' #5

Open
lucia-ramirez opened this issue Aug 13, 2024 · 1 comment
Open

Comments

@lucia-ramirez
Copy link

Hello, I'm trying to run the tutorial and I'm getting the following error. I think toytree might have changed its attributes as now I'm getting an error.

tree_mod= ana.CompositionalAnalysisTree(
...             data_LP_hn.copy(),
...             reference_cell_type="automatic",
...             formula="Health",
...             reg="scaled_3",
...             pen_args={"phi": 0}
...         )
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/software/hgi/envs/conda/team152/lr23/single_cell/lib/python3.12/site-packages/tasccoda/tree_ana.py", line 85, in __new__
    phy_tree = util.collapse_singularities(data.uns["phylo_tree"])
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/software/hgi/envs/conda/team152/lr23/single_cell/lib/python3.12/site-packages/tasccoda/tree_utils.py", line 78, in collapse_singularities
    A, _ = get_A(tree)
           ^^^^^^^^^^^
  File "/software/hgi/envs/conda/team152/lr23/single_cell/lib/python3.12/site-packages/tasccoda/tree_utils.py", line 41, in get_A
    leaves_i = list(set(tree.get_node_descendant_idxs(i)) & set(np.arange(n_tips)))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ToyTree' object has no attribute 'get_node_descendant_idxs'

I'm using tasccoda 0.1.3, toytree 3.0.5 and python 3.12.2

Thanks

@johannesostner
Copy link
Member

Hi @lucia-ramirez !
can you try to uninstall toytree and ete3 and install an older version with pip install toytree<3.0?
We don't actively maintain this repository anymore, but there is an active implementation in the pertpy package: https://github.com/scverse/pertpy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants