[ensembl-dev] How to get a tree stable id ?
Matthieu Muffato
muffato at ebi.ac.uk
Wed Apr 18 14:40:44 BST 2012
Hi Sébastien
You should call "fetch_all" on the protein tree adaptor. This will give
you an array with all the protein trees.
Initially, all the protein trees were indeed directly connected to what
you call "big_root", but we are now storing there the links between the
trees that are part of a bigger structure ("super-tree"), which defines
old duplications and distant paralogues.
By calling fetch_all_roots() and children(), you go into this internal
hierarchy of trees. fetch_all is the preferred way of getting all the
"normal" trees in one go.
Matthieu
On 18/04/12 14:31, Moretti Sébastien wrote:
> First, I get a list of all trees:
>
> my $protein_tree_adaptor = $reg->get_adaptor('Multi', 'compara',
> 'ProteinTree');
> 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
>
--
Matthieu Muffato, Ph.D.
Ensembl Developer - Comparative Genomics
European Bioinformatics Institute (EMBL-EBI)
Wellcome Trust Genome Campus, Hinxton
Cambridge, CB10 1SD, United Kingdom
More information about the Dev
mailing list