[ensembl-dev] $protein_tree_adaptor->fetch_all_roots

Moretti Sébastien sebastien.moretti at unil.ch
Tue Jan 10 15:19:29 GMT 2012


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

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