This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Retrieving the corresponding Haplotype CDS from Ensembl

Given a Ensembl protein identifier and amino acid substitution such as ENSP00000242351:701Q>E,851T>I, how do I programmatically retrieve and download the coding sequence (CDS) with the largest observed count.

Screenshot of the corresponding Haplotype CDS

I need to do this for a batch of different proteins*haplotypes so would like to use the REST API.

gene ensembl protein haplotype

1 answer

This REST API endpoint gets the haplotypes per transcript. The protein haplotypes have the associated cds haplotypes stored as hexes, which you can link to the cds haplotypes.

So would this be taking the hex for the ENSP00000242351:701Q>E,851T>I in 'protein_haplotypes' and finding it as 'other_hex' in the 'cds_haplotypes'?

yes, this would be it. Or you can go the other way, and get the other_hex from the protein_haplotype and find the cds_haplotype it's the main hex for.

Log in to answer this question.