[ensembl-dev] access CCDS id for a transcript

Andy Yates ayates at ebi.ac.uk
Fri Nov 15 15:51:50 GMT 2013


Hi there

Sorry for taking so long to reply to this email.

CCDS identifiers are linked to transcript rows via the object_xref and xref tables. Object_xref stores the relationship between an xref & an ensembl object; xref holds the primary accession of the external resource e.g. CCDS. Using the Perl API you can get this from the transcript object:

my $transcript = Bio::EnsEMBL::Registry->get_adaptor('human', 'core', 'transcript')->fetch_by_stable_id('ENST00000288602')
my $ccds_xrefs = $transcript->get_all_DBEntries('CCDS');
if(@{$ccds_xrefs}) {
  # Do something
}

You can also use the REST API:

http://beta.rest.ensembl.org/xrefs/id/ENST00000288602.json?external_db=CCDS

[{"display_id":"CCDS5863.1","primary_id":"CCDS5863","version":"1","description":"","dbname":"CCDS","synonyms":[],"info_type":"DIRECT","info_text":"","db_display_name":"CCDS"}]

Finally If you're doing this using SQL you can use:

select t.stable_id, x.dbprimary_acc, x.display_label
from transcript t
join object_xref ox on (t.transcript_id = ox.ensembl_id and ox.ensembl_object_type = 'Transcript')
join xref x using (xref_id)
join external_db e using (external_db_id)
where t.stable_id = 'ENST00000288602'
and e.db_name = 'CCDS';

---------------------------------------------------
| stable_id       | dbprimary_acc | display_label |
---------------------------------------------------
| ENST00000288602 | CCDS5863      | CCDS5863.1    |
---------------------------------------------------

Hope this helps

Andy

------------
Andrew Yates - Ensembl Core Software Project Leader
European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory
Wellcome Trust Genome Campus
Hinxton
Cambridge CB10 1SD
Tel: +44-(0)1223-492538
Fax: +44-(0)1223-494468
http://www.ensembl.org/

On 17 Oct 2013, at 16:34, "Jayaraman, Pushkala" <pjayaraman at mcw.edu> wrote:

> Hello,
> Im trying to get all transcripts with CCDS ids.. and I realize that the attrib_type id 57 and 58 don’t give me the CCDS ids..
>  
> How do I get al the CCDS ids for a transcript?
>  
> Pushkala Jayaraman
> Programmer/Analyst - Rat Genome Database
> Human and Molecular Genetics Center
> Medical College of Wisconsin
> 414-955-2229
> http://rgd.mcw.edu
>  
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info: http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/





More information about the Dev mailing list