Entering edit mode
11.3 years ago
Nitin
▴
170
Hi all,
I have set of genes ( ASCL1, AEBP1, MLF1) i want to search PUBMED for literature in glioma. Means i want to get Pubmed Ids for these genes in glioma. To acheive this i tried biopython script as follows
from Bio Import Entrez
Entrez.email = "my email"
data = Entrez.esearch(db="pubmed",term = "ASCL1 and glioma", "AEBP1 and glioma")
res=Entrez.read(data)
PMID = res["IdList"]
print PMID
It doesnt work it gives following error SyntaxError: non-keyword arg after keyword arg
As I am new to biopython i am not able to solve this problem..
Can any body please let me know how to parse multiple terms and get pubmed Ids
Thanks Ni
Thanks for reply that i tried it works perfectly..but i have mulitple genes ..so i want to get all Pubmed IDs for this genes in glioma..can you please tell me how to do that same Entrez.esearch?
how about using a simple loop ?
I tried this too it didnt work ..first I stored terms in text file as follows ASCL1 and glioma AEBP1 and glioma
infile = "file.txt"
for line in infile.readlines():
single_id = line
#Retreiving information
data = Entrez.esearch(db="pubmed",term = single_id)
res=Entrez.read(data)
PMID = res["IdList"]
print "%s" %(PMID)
out_put.write("%s\n" %(PMID))
out_put.close()
Can you tell where i am going wrong in this code? Thanks