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

Monophyly_prune errors with single species gene trees #4

Open
jasminelmah opened this issue Aug 2, 2021 · 0 comments
Open

Monophyly_prune errors with single species gene trees #4

jasminelmah opened this issue Aug 2, 2021 · 0 comments

Comments

@jasminelmah
Copy link

Monophyly_prune fails at line 80 sister = leaf.sister_nodes()[0] when encountering gene trees that have sequences from only a single species. The error:

Traceback (most recent call last):
File "/gpfs/ysm/project/dunn/jlm329/conda_envs/phylopytho/bin/treeprune", line 8, in
sys.exit(main())
File "/gpfs/ysm/project/dunn/jlm329/conda_envs/phylopytho/lib/python3.9/site-packages/phylopytho/treeprune.py", line 208, in main
tree = monophyly_prune(tree)
File "/gpfs/ysm/project/dunn/jlm329/conda_envs/phylopytho/lib/python3.9/site-packages/phylopytho/treeprune.py", line 80, in monophyly_prune
sister = leaf.sister_nodes()[0]
IndexError: list index out of range

An example of an offending tree:

(Schistosoma_mansoni@Smp-337900:0.00656752,((Schistosoma_mansoni@Smp-337890:0,Schistosoma_mansoni@Smp-337880:0):0.00126497,(((((Schistosoma_mansoni@Smp-318340:0.0369856,Schistosoma_mansoni@Smp-318350:0.00434441):0.233291,(Schistosoma_mansoni@Smp-337820:0.166968,Schistosoma_mansoni@Smp-332340:0.143222):0.122166):0.0392655,Schistosoma_mansoni@Smp-341850:0.508476):0.0292401,Schistosoma_mansoni@Smp-166690:0.627144):0.00657204,((((Schistosoma_mansoni@Smp-033380:0.526121,Schistosoma_mansoni@Smp-121230:0.599025):0.715415,Schistosoma_mansoni@Smp-166720:0.628339):0.0944244,(Schistosoma_mansoni@Smp-166730:0.0269917,Schistosoma_mansoni@Smp-337810:0.0366133):0.0844652):0.0173109,Schistosoma_mansoni@Smp-318370:0.0528969):0.196992):0.266284):0.00656752);

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

1 participant