[ensembl-dev] How to get a tree stable id ?

Moretti Sébastien sebastien.moretti at unil.ch
Wed Apr 18 14:31:03 BST 2012

First, I get a list of all trees:

my $protein_tree_adaptor = $reg->get_adaptor('Multi', 'compara', 
my ($big_root) = @{$protein_tree_adaptor->fetch_all_roots};
my @children = @{$big_root->children()};

then I get a node_id with the node_id() method on each @children elements.

Now, the 10 trees I have checked had all the "proteinclusterset" tree type.
What should be the "normal" protein tree type ?

> Hi
> Maybe you are hitting a tree that does not have a stable id: either a
> ncRNA tree or a protein super-tree.
> How do you retrieve the trees in the first place ?
> Matthieu
> On 18/04/12 14:15, Moretti Sébastien wrote:
>> I can access $tree->tree->tree_type
>> but $tree->tree->stable_id returns undef for all node_id I have tested
>> (5 node_ids), for our local ensembl 66 db, or the one from
>> ensembldb.ensembl.org.
>>> Hi
>>> Sorry, my message was not clear. You only need $tree->tree->stable_id
>>> with no "->tree()";
>>> Other tree_wide parameters are available, like $tree->tree->tree_type,
>>> $tree->tree->method_link_species_set_id, etc
>>> Matthieu

Sébastien Moretti
Department of Ecology and Evolution,
Biophore, University of Lausanne,
CH-1015 Lausanne, Switzerland
Tel.: +41 (21) 692 4221/4079
http://selectome.unil.ch/ http://bgee.unil.ch/

More information about the Dev mailing list