[ensembl-dev] compara and zebra proteins
Javier Herrero
jherrero at ebi.ac.uk
Thu Nov 25 14:35:54 GMT 2010
Hi Greg
As you mention, the fetch_by_source_stable_id method can take undef as a
source, effectively doing the work of a potential "fetch_by_stable_id" method.
The source name is not required when using Ensembl stable IDs. However, for
organisms where the stable IDs have been assigned externally like for
C.elegans you can have the same stable ID for the gene and the protein.
Specifying the source name is the only way to ensure you get the data you
want.
Javier
On Thursday 25 Nov 2010 13:08:03 Gregory Jordan wrote:
> This would make a *very* good addition to the docs, IMO. In my experience,
> undocumented magic strings such as this are a major contributor to many
> peoples' fear of the Ensembl APIs!
>
> http://www.ensembl.org/info/docs/Pdoc/ensembl-compara/modules/Bio/EnsEMBL/C
> ompara/DBSQL/MemberAdaptor.html#POD16
>
> On a related note: why is there no $member_adaptor->fetch_by_stable_id()
> method? My guess is most 'casual' users have little use for the source
> argument anyways, and it's very nonintuitive to have to use the
> fetch_by_source_stable_id method with the first argument being undef.
>
> greg
>
> 2010/11/25 Andy Yates <ayates at ebi.ac.uk>
>
> > You've spelt the source name incorrectly. Ensembl proteins are known as
> > ENSEMBLPEP in compara so your code should look more like:
> >
> > my $member =
> > $member_adaptor->fetch_by_source_stable_id('ENSEMBLPEP','ENSDARP000000304
> > 99');
> >
> > Apart from that your code looks good.
> >
> > Andy
> >
> > On 25 Nov 2010, at 10:17, Koray Doğan Kaya wrote:
> > > Can't I call a zebrafsh protein like this?
> > >
> > >
> > > my $member_adaptor =
> > > Bio::EnsEMBL::Registry->get_adaptor('Multi','compara','Member');
> > >
> > > my $member =
> >
> > $member_adaptor->fetch_by_source_stable_id('ENSEMBLPROTEIN','ENSDARP00000
> > 030499');
> >
> > > # print out some information about the Member
> > > print $member->description, "\n";
> > >
> > > --
> > > M.Sc. Koray Dogan Kaya
> > > PhD Candidate
> > > Bilkent University,
> > > Department of Molecular Biology and Genetics
> > > 06800 / Ankara
> > > Turkey
> > > Mobile: (+90) 533 526 09 51
> > > Office: (+90) 312 290 24 03
> > > e-mail: kkaya at bilkent.edu.tr
> > >
> > >
> > > _______________________________________________
> > > Dev mailing list
> > > Dev at ensembl.org
> > > http://lists.ensembl.org/mailman/listinfo/dev
> >
> > --
> > Andrew Yates Ensembl Genomes Engineer
> > EMBL-EBI Tel: +44-(0)1223-492538
> > Wellcome Trust Genome Campus Fax: +44-(0)1223-494468
> > Cambridge CB10 1SD, UK http://www.ensemblgenomes.org/
> >
> >
> >
> >
> >
> > _______________________________________________
> > Dev mailing list
> > Dev at ensembl.org
> > http://lists.ensembl.org/mailman/listinfo/dev
--
Javier Herrero, PhD
Ensembl Compara Project Leader
European Bioinformatics Institute (EMBL-EBI)
Wellcome Trust Genome Campus, Hinxton
Cambridge - CB10 1SD - UK
More information about the Dev
mailing list