[ensembl-dev] "Member adaptor" deprecated warning in Ensembl Compara perl API

Samiul Hasan samiul.x.hasan at gsk.com
Mon Jun 3 10:44:21 BST 2013


Hi Miguel,

Many thanks - this removed the warning message. My script got further but unfortunately hit a method in "Bio::EnsEMBL::Compara::Homology", which has now been removed: "get_all_Member_Attribute". This was a very useful method which I was previously using to retrieve members' genome short names, long names etc. (useful for friendly-renaming of sequences).  My ultimate goal is to pull out the cdna or protein alignment and rename the sequence identifiers to genome names. Could you please advise how I could get this now? Here is the code snippet:

my $all_homologies = $homology_adaptor->fetch_all_by_Member($member);

foreach my $this_homology (@$all_homologies) {

        my $all_member_attributes = $this_homology->get_all_Member_Attribute();

        my $simple_align;
        if ( $alignType eq 'codon' ) {
            $simple_align =
              $this_homology->get_SimpleAlign( 'cdna' => 1 );    #cds alignment
        }
        else {
            $simple_align =
              $this_homology->get_SimpleAlign();    #protein alignment
        }

        if ( $i == 0 ) {                            #only human data
            my $humanID = $simple_align->get_seq_by_pos(1)->id();
            my $ma      = $all_member_attributes->[0];
            my ( $mb, $attr ) = @$ma;

            #print $mb->genome_db->short_name() . "\n";

            $allIDs{$humanID}     = $mb->genome_db->short_name();
            $fullDBName{$humanID} = $mb->genome_db->name();
            my $taxon = $mb->genome_db->taxon_id();
        }

        #all other species
}

Best wishes, Samiul


________________________________

This e-mail was sent by GlaxoSmithKline Services Unlimited
(registered in England and Wales No. 1047315), which is a
member of the GlaxoSmithKline group of companies. The
registered address of GlaxoSmithKline Services Unlimited
is 980 Great West Road, Brentford, Middlesex TW8 9GS.





More information about the Dev mailing list