Ensembl REST requests for CDS sequences returning AA sequences
2
0
Entering edit mode
9.5 years ago

Hi,

I'm trying to use the Ensembl REST API to retrieve CDS sequences which works great most of the time, but occasionally it returns an amino acid sequence instead. Here's an example:

guest-028-002-021: User$ curl 'http://rest.ensemblgenomes.org/sequence/id/GLYMA13G38430.1?content-type=text/x-fasta;type=cds'
>GLYMA13G38430.1
MPAGIMIPARNMPSMIGRNGTVGGFGLSSGLSLGQIENHKASESQRSEEMFQPNLMEAGQ
LHPLDMPQNTSESDVPRIREDDFDSATKSGSENLEGASGEDQDPRPNKKKRYHRHTQHQI
QEMEAFFKECPHPDDKQRKELSRELGLEPLQVKFWFQNKRTQMKTQHERHENTQLRTENE
KLRADNMRFREALGNASCPNCGGPTAIGEMSFDEHHLRLENARLREEIDRISAIAAKYVG
KPVVSYPLVSPSSIPPRPLELGIGGGFGGQPGGTGGDMYGGAAGDLLRSISGPTEADKPI
IIELAVAAMEELIGMAQMGEPLWLTTLDGTTVLNEDEYIRSFPRGIGPKPAGFKFEASRE
TAVVIMNHVNLVEILMDVNQWSTVFAGIVSRAMTLEVLSTGVAGNYNGALQVMTAEVQVP
SPLVPTRESYFVRYCKQHGDGTWAVVDVSLDNLRPSPSARCRRRPSGCLIQEMPNGYSKV
IWVEHVEVDDRGVHNLYKQLVSSGHAFGAKRWVATLDRQCERLASAMATNIPTVDVGVIT
NQDGRKSMLKLAERMVISFCAGVSASTAHTWTTLSGTGADDVRVMTRKSVDDPGRPPGIV
LSAATSFWLPVSPKRVFEFLRDENSRSEWDILSNGGVVQEMAHIANGRDTGNCVSLLRVN
SANSSQSNMLILQESCADSTGSFVIYAPVDIVAMNVVLNGGDPDYVALLPSGFAILPDGT
TAHGGGIGDTGHGGSLLTVAFQILVDSVPTAKLSLGSVATVNNLIACTVERIKAALSGEV
A

Am I doing something wrong? GLYMA13G38430.1 is a valid TranscriptID when I look it up on the Ensembl Genomes website. I'm stumped. I'd appreciate any suggestions that folks might have. Thanks!

CDS Ensembl REST • 2.7k views
ADD COMMENT
0
Entering edit mode

Not sure at the moment. Fairly sure it's not you. In touch with our developers to find out.

ADD REPLY
4
Entering edit mode
9.5 years ago
ayates ▴ 60

Ok so this is caused by the reuse of stable identifiers between the different object types we have. GLYMA13G38430.1 is reused for both the transcript and translation stable identifier. The underlying Perl API is struggling to know which one you're requesting. You can get around this by forcing it to look for transcripts which will give you the CDS:

curl 'http://rest.ensemblgenomes.org/sequence/id/GLYMA13G38430.1?content-type=text/x-fasta;type=cds;object_type=transcript'

Hope this helps and sorry for the confusion.

ADD COMMENT
0
Entering edit mode

Great. That seems to be working perfectly. Thanks a lot.

ADD REPLY
0
Entering edit mode
9.5 years ago
Tariq Daouda ▴ 220

If you have many sequences to fetch and don't mind a little python, pyGeno could also be good alternative.

ADD COMMENT

Login before adding your answer.

Traffic: 1531 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6