[ensembl-dev] Converting cDNA position to genomic position!

Andy Yates ayates at ebi.ac.uk
Thu Nov 15 17:33:46 GMT 2012


Hi,

You can also use the REST API which can map from protein, cds and cDNA to genomic locations:

http://beta.rest.ensembl.org/map/cdna/ENST00000373968/123..554?content-type=application/json

Brings back

{"mappings":[{"seq_region_name":"10","gap":0,"coord_system":"chromosome","strand":-1,"rank":0,"end":54531338,"start":54531209},{"seq_region_name":"10","gap":0,"coord_system":"chromosome","strand":-1,"rank":0,"end":54530546,"start":54530430},{"seq_region_name":"10","gap":0,"coord_system":"chromosome","strand":-1,"rank":0,"end":54529075,"start":54529007},{"seq_region_name":"10","gap":0,"coord_system":"chromosome","strand":-1,"rank":0,"end":54528270,"start":54528155}]}

The REST API is rate limited to 3 mappings per second so using the Perl API will give you a higher throughput

Andy

Andrew Yates                   Ensembl Core Software Project Leader
EMBL-EBI                       Tel: +44-(0)1223-492538
Wellcome Trust Genome Campus   Fax: +44-(0)1223-494468
Cambridge CB10 1SD, UK         http://www.ensembl.org/

On 15 Nov 2012, at 10:59, Will McLaren wrote:

> Hello Oyediran,
> 
> You will need to use a TranscriptMapper object; http://www.ensembl.org/info/docs/Doxygen/core-api/classBio_1_1EnsEMBL_1_1TranscriptMapper.html
> 
> The method you should use is cdna2genomic. Note that this returns an array of coordinate objects; this is useful to know if, for example, your coordinates only partially overlap the transcript.
> 
> Here's a bit of code to get you started:
> 
> my $reg = 'Bio::EnsEMBL::Registry';
> $reg->load_registry_from_db(-host => 'ensembldb.ensembl.org',-user => 'anonymous');
> 
> my $ta = $reg->get_adaptor('human','core','transcript');
> 
> my $t = $ta->fetch_by_stable_id('ENST00000373968');
> 
> my $mapper = Bio::EnsEMBL::TranscriptMapper->new($t);
> 
> @coords = $trmapper->cdna2genomic( 123, 554 );
> 
> Regards
> 
> Will McLaren
> Ensembl Variation
> 
> 
> On 15 November 2012 10:45, Oyediran Akinrinade <oyediran.akinrinade at helsinki.fi> wrote:
> 
> 
> Hello,
> 
> I have a list of ensembl transcripts IDs with their corresponding cDNA
> positions and I will like to get their genomic positions using the
> ensembl API. I have no experience with perl although I have
> installed ensembl-api on my mac computer. There are about 6000 IDs
> that I will like to get their genomic cordinates/positions, and
> web-based queries will not be the best solution. To this end, I
> write to request for your assistance.
> 
> Looking forward to hearing from you soonest.
> 
> Thanks,
> 
> -Oyediran
> 
> 
> 
> 
> 
> _______________________________________________
> 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/
> 
> _______________________________________________
> 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