You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While investigating an error in ncfp I came across a problem stemming from bioservices. Following the "Quick Example" in README.md, I prepared a short Python script called test_bioservices.py, containing:
frombioservices.uniprotimportUniProtu=UniProt(verbose=False)
print("Trying u.mapping")
u.mapping("UniProtKB_AC-ID", "KEGG", "P43403,P123456")
print("Trying u.search with queries")
queries= ["P43403", "ZAP70", "ZAP70_HUMAN", "zap70+AND+organism:9606", "human AND antigen",
"human+AND+antigen", "zap70 and human", "organism:9606",
"accession:P62988", "organism_id:9606", "zap70+and+organism_id:9606"]
forqueryinqueries:
print(f"\t{query=}")
u.search(query, columns="id")
gives
% python test_bioservices.py [5:28:23]
Trying u.mapping
Trying u.search with queries
query='P43403'
query='ZAP70'
query='ZAP70_HUMAN'
query='zap70+AND+organism:9606'
WARNING [bioservices.UniProt:596]: status is not ok with Bad Request
query='human AND antigen'
query='human+AND+antigen'
query='zap70 and human'
query='organism:9606'
WARNING [bioservices.UniProt:596]: status is not ok with Bad Request
query='accession:P62988'
query='organism_id:9606'
query='zap70+and+organism_id:9606'
The text was updated successfully, but these errors were encountered:
@widdowquinn Uniprot has changed its API recently. I have updated bioservices but not the documentation.
It is now updated on bioservices.readthedocs.io
Unfortunately, the uniprot API has changed a lot for the best (json support for instance). However, this means that previous code will need to be changed accordingly. I tried to keep track of the changed to a minimum level.
as for your example, indeed taxonomy should be taxonomy_id and organism should be organism_id
While investigating an error in
ncfp
I came across a problem stemming frombioservices
. Following the "Quick Example" inREADME.md
, I prepared a short Python script calledtest_bioservices.py
, containing:Executing this gives the error:
Fixing the
frmt
argument (tsv
in place oftab
) gives the following error:matching the errors I was seeing in
ncfp
.Version information is below:
python --version [5:04:42] Python 3.9.13 >>> bioservices.version '1.10.0'
I think the
taxonomy
field in the example query needs to be modified totaxonomy_id
, as per https://www.uniprot.org/help/query-fields:gives
The text was updated successfully, but these errors were encountered: