NCBI query: how to find gid from locus?
2
0
Entering edit mode
8.3 years ago
weiduan93 • 0

Hi guys, I'm currently have a buntch of locus information(with prefix NM_) and I want retrieve their sequence information from NCBI. As far as I know NCBI's api (like Biopython.Entrez) only support queries by gid,and I did a lot of searches but found no solution of getting to know a gid from its locus. Could anyone help me with this?

gene sequence • 2.0k views
ADD COMMENT
2
Entering edit mode

If you are using linux machine

for i in `cat id_file`; do curl "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id=$i&retmode=text&rettype=fasta" >>out.fasta; done;
ADD REPLY
0
Entering edit mode

Thanks everyone! I was soooooooo stupid that I thought the 'id' parameter of Biopython.Entrez.efetch should be passed as the gid only, but just now I tried the locus ID and succeeded TUT

ADD REPLY
1
Entering edit mode
8.3 years ago
Sej Modha 5.3k

Have you tried NCBI e-utils?

ADD COMMENT
0
Entering edit mode
8.3 years ago
Jenez ▴ 540

Just so you know; NCBI are phasing out the usage of GI's in September.

http://www.ncbi.nlm.nih.gov/news/03-02-2016-phase-out-of-GI-numbers/

Use Accession.Version instead.

ADD COMMENT

Login before adding your answer.

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