[ensembl-dev] $protein_tree_adaptor->fetch_all_roots

Matthieu Muffato muffato at ebi.ac.uk
Tue Jan 10 15:37:15 GMT 2012


Hi Sébastien

There was indeed some work on tags in rel 65, but this should be 
transparent for users.
However, missing tags are now returning "undef" instead of an empty 
string. Does it match your error ?

That said, every internal node should have a 'taxon_name' tag, and 
leaves shouldn't (same behaviour as in rel 64). Can you give me an 
example of a failing $node_id ?

Cheers,
Matthieu

On 10/01/12 15:19, Moretti Sébastien wrote:
> Hi Matthieu,
>
> this method works now. Thanks
>
>
> But later in our script things are broken now.
> my $tree = $protein_tree_adaptor->fetch_node_by_node_id($node_id);
> my $tax_level = $tree->get_tagvalue('taxon_name');
>
> We use this piece of code to parse protein trees and extract specific
> sub-trees with a chosen taxonomic root.
>
> Now, it looks like the taxon_name tag does not exist anymore in tree
> object.
>
> An idea ?
> Regards
>
>> Dear Sébastien,
>>
>> Thank you for spotting this ! fetch_all_roots indeed broke with some
>> database work on the release 65.
>>
>> I've fixed the code and fetch_all_roots is now working as expected. Can
>> you update your CVS checkout ? Otherwise, you can use
>> fetch_node_by_node_id(1), which is less generic, but is currently
>> working.
>>
>> Best,
>> Matthieu
>>
>> On 10/01/12 14:40, Moretti Sébastien wrote:
>>> Hi
>>>
>>> We used the following code before and it worked perfectly (at least with
>>> ensembl 61). Now it does not work anymore with ensembl 65.
>>>
>>> my $protein_tree_adaptor = $reg->get_adaptor('Multi', 'compara',
>>> 'ProteinTree');
>>> my ($big_root) = @{$protein_tree_adaptor->fetch_all_roots};
>>> my @children = @{$big_root->children()};
>>>
>>>
>>> Now the children method is undefined:
>>> Can't call method "children" on an undefined value
>>>
>>>
>>> Could you tell me how to get all gene/protein tree ids from compara
>>> now ?
>>> I guess there is another way to get them.
>>>
>>> Thanks
>>> Regards
>


-- 
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