Getting cDNA sequence from NCBI
2
0
Entering edit mode
6 weeks ago

I am looking at NCBI’s api page and I cannot seem to find any endpoint that returns the cDNA by transcript id.

In fact NCBI nuccore has a webpage for this. and if I want to i can scrape the part coming after ORIGIN. however I guess they do not want this (which I really disagree).

Then the question is, where is their REST api that clearly states how to fetch cDNA by transcript id?

fetch sequence gene ncbi • 385 views
ADD COMMENT
3
0
Entering edit mode

I think this is more suited to what I actually wanted. A GET request with single id would return what I wanted. However these ids are UIDs (gene id) for NCBI. I wonder whether it is possible to submit transcript ids (for instance NM_XYZ) and receive similar input? I was not able to locate any specs that refer to transcript ids in the help page you linked.

ADD REPLY
0
Entering edit mode

OMG I just replaced id with 'NM_014491.4', guessing it would return empty string because it is a RefSeq id, not a gene id, but it worked!

I have no idea whether they intended that, because obviously it is not stated in their docs, but I guess I am happy with it. Thank you!

PS: For those who want to do something similar: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id=NM_014491.4&rettype=fasta&retmode=text

so the id can be BOTH gene id or RefSeq , and does not seem to require API key, perfect.

ADD REPLY
1
Entering edit mode
6 weeks ago
GenoMax 107k

You can use Entrezdirect (sequence truncated):

$ efetch -db nuccore -id "NM_014491.4" -format fasta 
>NM_014491.4 Homo sapiens forkhead box P2 (FOXP2), transcript variant 1, mRNA
ACAGACATGAAAGCTAACCGAGGACTTGAGAGACTCAAACTGGTGCTTTTGTCTCTCTCTCTCTGTCTTT
CTCTCTCTCACACACACACTCACACACTCACACACATGCACACACACACATACACACACACAAAAATGAA
GCACTTACTTTAGAAAGATTATGGTAAGCATGCTGGCTCAGTCTTGAACCTTTGTCACCCCTCACGTTGC

I don't think NCBI provides a direct API to access sequence data. You could use Entrezpi (LINK) or Bio.Entrez (LINK) if you need programmatic access.

ADD COMMENT
0
Entering edit mode

aah I see, i was hoping for an end point where I could cURL without any dependencies. I will need to install some packages I guess. Thank you.

ADD REPLY

Login before adding your answer.

Traffic: 2558 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