Entering edit mode
6.8 years ago
horsedog
▴
60
I have a bunch of refseq assembly genome number likeGCF_002514765.1,GCF_002485085.1,GCF_002201835.1,GCF_000593305.2,GCF_001887655.1,GCF_000194215.1,GCF_002098145.1,GCF_002807875.1
Now I want to use these to search which genome it is , for example, the first one is Escherichia coli strain MOD1-EC3823
, I try to use efetch to achieve this, but seems it does not work, it says "urllib.error.HTTPError: HTTP Error 400: Bad Request"
here is my python code:
from Bio import Entrez
Entrez.email = "hulala@gmail.com"
ID = open("assembly_ID").read()
handle = Entrez.efetch(db="assembly", id= ID, rettype="gb")
print(handle.read())
Does anyone have any idea?
Hi , thanks , but it says
"SyntaxError: invalid syntax"
atSub_value
do you mean by replacingby your code? but here the
-query
is not just one ID, there are thousands ofyou will need to do a loop in your python code to query each accession one at a time.