[ensembl-dev] get_SimpleAlign(-cdna=>1) broken and deprecated?

Sébastien Moretti sebastien.moretti at unil.ch
Tue Mar 31 11:23:49 BST 2015


Hi Matthieu,

I use the live database and in my hands
     get_SimpleAlign(-SEQ_TYPE => 'cds')
or
     get_AlignedMemberSet()->get_SimpleAlign(-SEQ_TYPE => 'cds')
return both the protein alignment.
I cannot get the nucleotide alignment.


Thanks for your help


my $reg = 'Bio::EnsEMBL::Registry';
$reg->load_registry_from_db(
      ...
);
my $tree_adaptor = $reg->get_adaptor('Multi', 'compara', 'GeneTree');
my $tree = $tree_adaptor->fetch_by_root_id(375021); # id example
$tree    = $tree->root; # To use GeneTreeNode everywhere after that !!!!
...
my $prot_align = $tree->get_AlignedMemberSet()->get_SimpleAlign();
my $cds_align  = 
$tree->get_AlignedMemberSet()->get_SimpleAlign(-SEQ_TYPE => 'cds');

> Hi Sébastien,
>
> get_SimpleAlign(-SEQ_TYPE => 'cds') should work. Are you querying the
> live database or your own mirror ? If the latter, have you loaded the
> "other_member_sequence" table ?
>
> Yes, $gene_tree_node->get_SimpleAlign() is likely to be deprecated at
> some point. Instead,
> $gene_tree_node->get_AlignedMemberSet()->get_SimpleAlign() will work
>
> Matthieu
>
> On 31/03/15 08:04, Sébastien Moretti wrote:
>> Hi
>>
>> With Ensembl API 71, or previous versions, I used to retrieve nucleotide
>> (cds) alignments from a GeneTree set with
>>     $tree->get_SimpleAlign(-cdna=>1);
>>
>> And related protein alignment with
>>     $tree->get_SimpleAlign();
>>
>>
>> Now with Ensembl API 79
>>     $tree->get_SimpleAlign(-cdna=>1);
>> also returns the protein alignment (without warning).
>>
>>
>> I tried
>>     $tree->get_SimpleAlign(-SEQ_TYPE => 'cds')
>> or
>>     $tree->get_SimpleAlign(-SEQ_TYPE => 'cdna')
>> without much success.
>>
>>
>> So what is the proper way now to retrieve a nucleotide alignment from a
>> GeneTree set?
>>
>> Also Bio::EnsEMBL::Compara::GeneTreeNode::get_SimpleAlign is labeled as
>> "deprecated soon".
>>
>>
>> Regards

-- 
Sébastien Moretti
Staff Scientist
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