This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to retrieve COSMIC variations using Ensembl REST API?

I'm failing to retrieve Cosmic variations for some human genes using Ensembl API.

Using a web browser with this link:

http://www.ensembl.org/Homo_sapiens/Transcript/ProtVariations?db=core;g=ENSG00000141510;r=17:7661779-7687550;t=ENST00000617185

illustrates that Cosmic variations are available for gene TP53 (ensembl id=ENSG00000141510); in the above URL, I actually retrieved variations for one on the many TP53 transcripts, ENST00000617185.

Ok, now, if I use one of these URLs (Ensembl API based) :

I can retrieve Clinvar, PhenCode, etc. mutations but no Cosmic ones.

Any idea of what I did wrong?

An optional question: to which kind of Ensembl objects (gene, transcript, protein) are attached the many variation features available from Ensembl? I could not find a documentation about that.

variation ensembl api cosmic

1 answer

Hi Patrick,

We seperate somatic data from germline, so the query should be: curl -H 'Content-type:text/xml' 'http://rest.ensembl.org/overlap/id/ENSG00000141510?feature=somatic_variation'

<data id="COSM5493517" assembly_name="GRCh38" consequence_type="splice_region_variant" end="7662020" feature_type="somatic_variation" seq_region_name="17" source="COSMIC" start="766201 9" strand="1"> <alleles>COSMIC_MUTATION</alleles> </data> <data id="COSM18654" assembly_name="GRCh38" consequence_type="transcript_ablation" end="7676594" feature_type="somatic_variation" seq_region_name="17" source="COSMIC" start="7669609" s="" trand="1">

See: http://rest.ensembl.org/documentation/info/overlap_id for the list of feature types.

For the optional question: the genomic locations of variants are stored in our database, and are not linked to objects per se. The variant consequence(s)/effect(s) on gene(s) is inferred from the variant location in relation to the gene model.

Best wishes

Ben Ensembl Helpdesk

Hi Ben,

ok, got it, thanks. By the way, do you have any documentation that gives more insights on how to combine feature types with variant_set. E.g. if I use "feature=variation", what are the appropriate values for "variant_set" ? I cannot find that information from the "overlap" service web page, neither from this page.

-Patrick

The 'variant_set' filter only works with the 'variation' feature type. We will change the text to clarify this for e!88, though.

Log in to answer this question.