Hello to everyone,
I'm novice in biopython and I've a problem in my code I don't know why. When I try to look for a nutrient with its name it works. But, when I put nutrientsin a list for a sequential search it does not work. This is my code below:
I have for example differents results for calcium[nutrient] and elt[nutrient] where elt = calcium for my first test.
So, I need your help please
I'm novice in biopython and I've a problem in my code I don't know why. When I try to look for a nutrient with its name it works. But, when I put nutrientsin a list for a sequential search it does not work. This is my code below:
Code:
for line in nFile:
file.append(line)
for elt in file:
Entrez.email = "[email protected]"
handle = Entrez.egquery(term="orchid")
record = Entrez.read(handle)
handle = Entrez.esearch(db="pubmed", term="orchid[Orgn] AND elt[nutrient]", retmax=5)
record = Entrez.read(handle)
idlist = record["IdList"]
handle = Entrez.efetch(db="pubmed", id=idlist, rettype="medline", retmode="text")
records = Medline.parse(handle)
records = list(records)
for record in records:
print("Title:", record.get("TI", "?"))
So, I need your help please