Closed ArnaudBelcour closed 1 year ago
I have also had this issue using u.search()
. Was trying to query 200 proteins, but the results were always 25 proteins.
prot_search = u.search(query="+OR+".join(proteins), columns='id,annotation_score,lineage', frmt='tsv')
Using python 3.8.11 and bioservices 1.10.4
Also, I used u.search()
because u.get_df()
doesn't allow specific columns.
Thanks.
@joaosegurilho sorry for the later answer. I believe that in your case, using the parameter limit should help. For instance for 200 proteins, call the method with limit=200; if unsure, you can set a limit that is large enough e.g. 1000. :
prot_search = u.search(query="+OR+".join(proteins), columns='id,annotation_score,lineage', frmt='tsv', limit=200)
by default all uniprot calls have a limit of 25 results according to their API. I'll try to update the code to make it automatic in the future.
@ArnaudBelcour looks like there is also a limit of 25 on the mapping functionality but here I did not manage to implement the limit parameter. Not sure whether it is a bug in the uniprot API or not. So, the only solution for now is to split the input list in chunk of 25. similarly to the previous comment made here, I will try to update the code to make this process automatic in the future release. best
Should be fixed in v1.11.0 now available on pypi.
Hello,
First thank you for this package, it is very useful.
I have an issue when using UniProt with bioservices 1.10.4 on Python 3.8.10. I try to retrieve protein annotations from UniProt using the mapping function:
There are 26 proteins that are given as a mapping query. But when I check the results, there are only 25 proteins even if the last protein has annotations on UniProt. I have tested with other number of proteins and it seems that there is a limit of 25 results for this mapping function.
But I do not find any information about it. Is it an error on my side with an option that I have missed?