[Bioperl-l] Taxonomy hierarchy extraction
bix at sendu.me.uk
Tue Jun 19 03:01:05 EDT 2007
Jason Stajich wrote:
> The reason it isn't printing anything is someone didn't really write
> the implementation quite right. This code was overhauled by Sendu
> before the last release I guess something didn't quite get connected.
> I checked in code that has the Bio::Taxon delegating now to a DB
> handle for the each_Descendent call.
> You can either patch your code or just use the code listed here:
I've reverted that change.
For some reason the docs for Bio::Taxon::each_Descendent aren't showing
up on the website, but they state:
Note that this method never asks the database for the descendents; it
will only return objects you have manually set with add_Descendent(), or
where this was done for you by making a Bio::Tree::Tree with this object
as an argument to new().
To get the database descendents use
I also have a note in the Synopsis for the module:
# Though be careful with each_Descendent - unless you add_Descendent()
# yourself, you won't get an answer because unlike for ancestor(),
# Bio::Taxon does not ask the database for the answer. You can ask the
# database yourself using the same method:
($human) = $homo->db_handle->each_Descendent($homo);
This is quite deliberate and is to prevent Bad Things from happening.
(Can't exactly remember the reasoning now, but I know it was good.)
More information about the Bioperl-l