Documentation
API
Submit
Submit URL construction
Base URL for submission: https://subsumption.glyomics.org/submit?
URL parameter key: tasks
URL parameter value: URL encoded JSON string with tasks in a JavaScript array.
Each task: {"seq": "GlycoCT or WURCS sequence"}
For example, if there are 2 different glycans with sequence of "GlycoCT Sequence here" and "WURCS Sequence here",
and the constructed URL for Subsumption is the following:
https://subsumption.glyomics.org/submit?tasks=%5B%7B%22seq%22:%22GlycoCT%20Sequence%20here%22%7D,%7B%22seq%22:%22WURCS%20Sequence%20here%22%7D%5D
Submit response
The response is encoded in JSON document, which is a list of tasks you just submitted. Each task will include
an extra field called "id", which are used for later retrieval process.
Example response:
Retrieval
Retrieval URL construction
Base URL for retrieval: https://subsumption.glyomics.org/retrieval?
URL parameter key: task_ids
URL parameter value: URL encoded JSON string with the "id" field in a JavaScript array.
Let's use the 2 IDs in the example above to show how to construct the retrieval URL
https://subsumption.glyomics.org/retrieve?task_ids=%5B%2220dfe818ae0a3ddad11ebd97c8ddb51aw2f30sbkrnzf5e4ha7mm%22,%228b3adbe6df01722f6043270c9338f7b5w2f30sbkrnzf5e4ha7mm%22%5D
Retrieval response
Example response:
The response is encoded in JSON document, which is a list contains the result/status you are asking for.
ID: The ID of the task, might be useful for your own sanity check.
Finished: As the name suggest, it indicates whether the computation for this specific task finishes or not. Always check this first. If it's not finished yet, please try again in 5~10s.
Stat: It includes how long it takes for this task to be computed, which doesn't include the wait time if the server is too busy. Also, we have a cache infrastructure for tasks that we've seen before. The cache field indicates whether this is read directly from cache or it is freshly computed.
Error: A list of messages of what issue the server is facing, which hopefully can bring some insight of what's going on.
Result: The result for your task.
Note:
1. Both submit and retrieval URL supports bulk submission, which means you can submit multiple tasks in one single request. But you can also submit/retrieve them one by one.
2. See more examples by submitting your own sequences here, and follow links for JSON in result page.
Client
JavaScript
Python 2&3
Deployment
Note:
1. Example command is used for running Subsumption app at localhost:10982. See it in your browser.
2. Increase WEBSERVICE_BASIC_CPU_CORE under heavy usage
3. Increase WEBSERVICE_BASIC_CPU_CORE will also increase memory usage
About
APIFramework
Subsumption is powered by APIFramework which provides the web-request based interaction, asynchronous API,
parallel computing, easily migratable, and result caching ability.
Related apps: Motif Match,
GlyLookup,
Subsumption,
Substructure,
Glymage
Open source
Source code
Source code of APIFramework
Source code of Subsumption
Build process Subsumption
Dependency
PyGly, GNOme, GlyTouCan, GlycoMotif, Flask, rdflib