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

get_descendant_taxa returns empty list with collapse_subspecies = True #308

Closed
leapicard opened this issue Oct 13, 2017 · 2 comments
Closed

Comments

@leapicard
Copy link

leapicard commented Oct 13, 2017

Hello,

I am running this example from the docs:
http://etetoolkit.org/docs/latest/tutorial/tutorial_ncbitaxonomy.html#getting-descendant-taxa

But the second call to print returns an empty list instead of the two item list described in the example.
This is my output:


[u'Homo heidelbergensis', u'Homo sapiens ssp. Denisova', u'Homo sapiens neanderthalensis']
[]
 
           /-Homo heidelbergensis, 1425170
 -Homo, 9605
           \-Homo sapiens, 9606

Do you have any idea what could be the problem?

Best,
Lea

@leapicard leapicard changed the title get_descendant_taxa returns empty list with collapse_species = True get_descendant_taxa returns empty list with collapse_subspecies = True Oct 13, 2017
@jhcepas
Copy link
Member

jhcepas commented Oct 13, 2017

must be a typo in the tutorial.
descendants is a generator, so you may need to run:

print ncbi.translate_to_names(list(descendants))

@leapicard
Copy link
Author

Thank you, it was indeed the case.

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