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

Matthieu Muffato muffato at ebi.ac.uk
Wed Apr 18 12:13:42 BST 2012

Hi Sébastien

We have updated the class hierarchy for gene trees in e66, and will 
finish to do so in e67

The new way of getting the tree stable_id from a node (e.g. the return 
value of fetch_node_by_node_id) is $node->tree->stable_id

->tree() returns a GeneTree object which contains the tree-wide values, 
leaving in the nodes the node-specific attributes.


On 18/04/12 11:23, Moretti Sébastien wrote:
> Hi
> with the ensembl 66 API, I cannot get the gene tree stable id I used to
> get before with previous ensembl API.
> I build a protein tree adaptor, fetch a node with a node_id but cannot
> get the ENSGT00* id anymore.
> e.g. with node_id = 2
> my $tree = $protein_tree_adaptor->fetch_node_by_node_id($node_id);
> my $stable_id = $tree->node_id;
> This returns 2, and not the ENSGT00* id I expect.
> I cannot see any ENSGT00* strings with Data:Dumper in the $tree object.

More information about the Dev mailing list