/api/create/ (POST)

Creates a report. All parameters should be sent as form data.

Parameters:

sequence
The optional protein sequence, otherwise send an accession code.
uniprot_ac
The optional uniprot accession code.
pdb_ac
The optional pdb accession code.
position
The position of the mutation in the sequence.
mutant
The mutant amino acid letter.

Returns:

The id of the report.


/api/statistics/ (GET)

Get the statistics for the total number of jobs in HOPE.

Parameters:

Returns:

the number of PENDING, STARTED, SUCCESS, FAILURE and total number of jobs


/api/status/<report_id>/ (GET)

Get the status of a previous job submission.

Parameters:

report_id
The id returned by a call to the create method.

Returns:

Either PENDING, STARTED, SUCCESS, FAILURE, RETRY, or REVOKED.


Example Usage in Python 3.6

To submit a job to HOPE and recieve a job id:

>>> import requests >>> r = requests.post("http://cmbi23.cmbi.umcn.nl:5000/hope//hope/api/create/", data={"uniprot_ac": "P07550", "position": 10, "mutant": "G"}) >>> print(r.json()["id"]) "5e299250fcfeefd2de3e74f4"

To retrieve the statuses of the job's subtasks:

>>> r = requests.get("http://cmbi23.cmbi.umcn.nl:5000//hope/api/status/5e299250fcfeefd2de3e74f4/") >>> statuses = r.json()["statuses"] >>> for status in statuses: ... print(status) {"name": "blast_pdb", "status": "SUCCESS"} {"name": "blast_swissprot_uniprot", "status": "SUCCESS"} {"name": "get_reprof_features", "status": "SUCCESS"} {"name": "get_esp_features", "status": "RETRY"} {"name": "get_interpro_features", "status": "SUCCESS"} {"name": "get_pisa_features", "status": "SUCCESS"} {"name": "get_structure_features", "status": "SUCCESS"} {"name": "get_uniprot_features", "status": "SUCCESS"} {"name": "get_dbnsfp_features", "status": "SUCCESS"} {"name": "get_hssp_features", "status": "SUCCESS"} {"name": "create_stills", "status": "SUCCESS"} {"name": "create_movies", "status": "SUCCESS"}