how to the file that has list of all PMIDs with corresponding authors?
1
0
Entering edit mode
8.5 years ago
Moses ▴ 150

Hi all,

I have a huge list of pubmed IDs, 48157 IDs to be precise. I am working on extracting the list of authors from these IDs. I wrote a python script to do that. however its not a fast method and the connection with the server keeps breaking up and I have to follow up the process. Is there any way that I could get a csv file that has all these information? Thanks in advance.

pubmed NCBI • 1.7k views
ADD COMMENT
1
Entering edit mode
8.5 years ago

using a Makefile:

PMIDS=$(shell cat your_list_of_pmid.txt)
define fun
$(1).txt:
    wget -O - "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id=$(1)&retmode=text&rettype=medline" | grep "^FAU - " | cut -c 7- | awk '{printf("$(1)\t%s\n",$$$$0);}' > $$(addsuffix .tmp,$$@) && mv $$(addsuffix .tmp,$$@) $$@

endef

all: $(addsuffix .txt,$(PMIDS))

$(eval $(foreach P,$(PMIDS),$(call fun,$P)))

then, invoke this Makefile using a parallel option (.e.g 5 parallel jobs), non-breaking:

make -j 5 -k 
ADD COMMENT

Login before adding your answer.

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