Entrez.efetch with retmax=1000000 not retrieving more than 10000 records (python)
Hello!
I'm trying to use the python Entrez package to retrieve about 25,000 protein records, but it seems to max out at the limit of 10,000 even when I use retmax. I feel like I'm missing something silly here...
Below are the relevant lines of code:
from Bio import SeqIO
from Bio import Entrez
Entrez.email = "myemail"
get = a list of about 25,000 protein accessions.
handle = Entrez.efetch(db="protein", retmax=1000000, id= get, rettype="fasta", retmode="text")
records = SeqIO.parse(handle, "fasta")
SeqIO.write(records, "proteins.faa", "fasta")
proteins.faa will only have 10000 records even with retmax set to 1,000,000
• 1,631 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Have you signed up for NCBI_API_KEY? If you have not you should do that first and use it. NCBI limits records to perhaps 10K without it (and there are limits on queries per time as well).