[ensembl-dev] REST API: Feature ID returns multiple results

Saren Tasciyan saren.tasciyan at univie.ac.at
Mon May 19 14:02:24 BST 2014


This allows me to filter unwanted results out. I can ignore entries with 
different IDs.
This approach seems to be working perfectly. Also my understanding for 
the usage of feature=... was a bit wrong.

Thanks a lot Magali!

Saren

Am 19.05.2014 12:29, schrieb mag:
> Hi Saren,
>
> The feature look up will return all features of the given object type 
> that overlap your queried region.
>
> In your example, the region is the input gene and two transcripts 
> overlap this region.
>
> To retrieve the gene linked to a transcript, I would recommend using 
> 'feature=transcript' instead
> Among the fields returned, there is a 'Parent' field that will specify 
> which gene the transcript belongs to.
>
> http://beta.rest.ensembl.org/feature/id/ENSMUST00000163188?feature=transcript;content-type=text/xml
> <dataID="ENSMUST00000163188"Parent="ENSMUSG00000057729"biotype="processed_transcript"description=""end="79883041"external_name="Prtn3-004"feature_type="transcript"logic_name="havana"seq_region_name="10"source="ensembl_havana"start="79874476"strand="1"/>
>
> This will still return more transcripts than your input, but you will 
> be able to uniquely associate each transcript to its gene.
>
>
> Hope that helps,
> Magali
>
> On 19/05/2014 10:00, Saren Tasciyan wrote:
>> Hi,
>>
>> I am using REST API for my Java application, however I am stuck with 
>> a problem:
>> I have a list of transcript IDs (ENSMUST....) from which, I want to 
>> gather gene IDs. So I have decided to use following endpoint:
>> http://beta.rest.ensembl.org*/feature/id/ENSMUST00000163188**?feature=gene*;content-type=text/xml
>> as you can see that this returns 2 IDs:
>>
>> <opt>
>> <dataID="ENSMUSG00000035835"biotype="protein_coding"description="cDNA 
>> sequence BC005764 [Source:MGI 
>> Symbol;Acc:MGI:2388640]"end="79874634"external_name="BC005764"feature_type="gene"logic_name="ensembl_havana_gene"seq_region_name="10"source="ensembl_havana"start="79860475"strand="-1"/>
>> <dataID="ENSMUSG00000057729"biotype="protein_coding"description="proteinase 
>> 3 [Source:MGI 
>> Symbol;Acc:MGI:893580]"end="79883174"external_name="Prtn3"feature_type="gene"logic_name="ensembl_havana_gene"seq_region_name="10"source="ensembl_havana"start="79874476"strand="1"/>
>> </opt>
>>
>> When queried from Ensembl website I "only" get one result:
>> http://www.ensembl.org/Mus_musculus/Transcript/Summary?db=core;g=ENSMUSG00000057729;r=10:79874476-79883041;t=ENSMUST00000163188
>>
>> My idea, when I first ran into this problem was to use logic_name as 
>> an indicator, as this problem is even more frequent with ncrna, etc. 
>> However both results here have same logic_name.
>> Correct results would be "according to my dataset" the second one. Am 
>> I using a wrong approach here or should I include more parameters in 
>> my query?
>>
>> As an example here are more queries with multiple results:
>> http://beta.rest.ensembl.org/feature/id/ENSMUST00000040746?feature=gene;content-type=text/xml
>> http://beta.rest.ensembl.org/feature/id/ENSMUST00000075162?feature=gene;content-type=text/xml
>> http://beta.rest.ensembl.org/feature/id/ENSMUST00000080673?feature=gene;content-type=text/xml
>> http://beta.rest.ensembl.org/feature/id/ENSMUST00000118639?feature=gene;content-type=text/xml
>>
>> Cheers,
>> Saren
>>
>> -- 
>> Saren Tasciyan
>>
>> Master Student & IT Technician at Karl Kuchler Group
>> Room: 2.107
>>
>> Max F. Perutz Laboratories GmbH
>> Dr. Bohr-Gasse 9
>> A-1030 Wien
>>
>> T: +43-1-4277- 61812
>> E: saren.tasciyan at univie.ac.at
>>
>>
>> _______________________________________________
>> Dev mailing listDev 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/

-- 
Saren Tasciyan

Master Student & IT Technician at Karl Kuchler Group
Room: 2.107

Max F. Perutz Laboratories GmbH
Dr. Bohr-Gasse 9
A-1030 Wien

T: +43-1-4277- 61812
E: saren.tasciyan at univie.ac.at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20140519/db96c6c6/attachment.html>


More information about the Dev mailing list