multimeric / unipressed Goto Github PK
View Code? Open in Web Editor NEWComprehensive Python client for the Uniprot REST API
Home Page: https://multimeric.github.io/Unipressed/
License: MIT License
Comprehensive Python client for the Uniprot REST API
Home Page: https://multimeric.github.io/Unipressed/
License: MIT License
Hello,
I'd like to use the idmappingclient but I have to get lucky to not end up with the error
UniProt has not yet processed the results, consider using time.sleep() to wait until they are complete.
I have reduced the size of my query lists quite a bit but at some point in my loop, I will get the error. I have added time.sleep() before I call request.each_result() but I don't know how long to set it for to ensure I don't run into the error.
I see there is a "waiting" module but I'm not sure how to incorporate it into this so I can wait indefinitely for the results to be returned.
Thank you for this package.
Dan
Currently we get a lot of the same XXEvidence
classes, but many are the same.
Hello there,
I am using the example given in the main README to get the ID mappings:
from unipressed import IdMappingClient
request = IdMappingClient.submit(
source="UniProtKB_AC-ID", dest="Gene_Name", ids={"A1L190", "A0JP26", "A0PK11"}
)
list(request.each_result())
But I want to check the status before obtaining the results, so I call request.get_status()
and obtain the following error:
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
File "/usr/local/lib/python3.10/dist-packages/unipressed/id_mapping/core.py", line 52, in get_status
return requests.get(
KeyError: 'jobStatus'
I hope you can help me to know what I am doing wrong.
The type annotations aren't helpful to those not using an IDE.
Perhaps allow lists, such as [8, '*']
since some users might prefer this.
e.g. html, rdf, fasta, obo, xlsx
This will clarify the available download formats
e.g. organism_id
is only listed under autoCompleteQueryTerm
.
Since this option is only relevant to uniprotkb
.
In theory we could replace all the TypedDict
with pydantic models.
Advantages:
Disadvantages:
This might be tricky, since each overload depends on the instance variables, so @overload
can't be used here. This may require a small API restructure.
There doesn't seem to be a way to add docstrings to Literal
, but perhaps they could be converted to enums with docstrings.
Unipressed/unipressed/dataset/core.py
Lines 41 to 47 in af5eea8
The Search
dataclass has a include_isoform
member variable, but the search
method of the UniprotkbClient
class does not expose this as a parameter.
Can we add this as a parameter?
This just collects together all the dataset Search
subclasses. This could be automated.
It turns out there are OpenAPI docs at https://rest.uniprot.org/docs/. Some info found here can't be found elsewhere.
Documented here: https://www.uniprot.org/help/api_retrieve_entries
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.