Documentation

This webserver si available also through API

Send request

  • URL : '/api/'

  • METHOD : | POST |

  • DATA FORMAT : "{'PROTEINID1': 'SEQUENCE1', 'PROTEINID2': 'SEQUENCE2', '...': '....'}"

    Add the entry "extra_predictions": "true" to the dict to get also EFoldMine and DynaMine results

  • SUCCESS RESPONSE : Code = 202 Accepted

    {
        "Location": "/api/queue/queueID/",
        "message": "We are processing your request, check queue to be updated
                                about the processing status",
        "queue_id": queueID
    }
                    
  • ERROR RESPONSE: Code = 400 Bad Request, Content = {}

  • NOTES : From this request you will get a queue id location to check the proessing status



Get queue status

  • URL : '/api/queue/ID'

  • METHOD : | GET |

  • SUCCESS RESPONSE :

    Code = 202 Accepted

    {
        "id": queueID,
        "Location": "not available",
        "request_text": "We are processing your request, there are still N process in queue",
    }
                    

    OR

    Code = 303 See other

    {'Location': '/api/resID'"}
                    
  • ERROR RESPONSE: Code = 404 Not found, Content = {}

  • NOTES : From this resource you will get infos about the status of your request



Get results

  • URL : '/api/ID'

  • METHOD : | GET |

  • SUCCESS RESPONSE : Code = 200 Ok

    {
        "creation_date": "yyyy-mm-ddTHH::MM.millisecZ",
        "id": ID,
        "results": [
            {
                "disomine": [
                val1, val2, val3, .., ..],
                "proteinID": "proteinid1",
                "sequence": "sequence1"
            }
        ]
    }
                    
  • ERROR RESPONSE: Code = Not found, Content = {}

  • NOTES : From this resource you will get your results in JSON format


API CALL EXAMPLE

Api call example using httpie ($ apt install httpie)

  • Send request to webserver

    http POST http://bio2byte.be/disomine/api/ < path/input_file.json
                    

    Add the entry "extra_predictions": "true" to the json dict to get also EFoldMine and DynaMine results

  • Response example

    {
        "Location": "/api/queue/299/",
        "message": "We are processing your request, check queue to be updated about the processing status",
        "queue_id": 299
    }
                    
  • Check queue request status

    http --follow GET http://bio2byte.be/disomine/api/queue/299
                    
  • Responses example

    • Case 1: Results still not available

          {
              "id": 299
              "location": "not available",
              "request_text": "We are processing your request, there are still 2 processes in queue",
          }
                              

    (You have to call the server again to check if your results are available)

    • Case 2: Results available

      {
          "id": 300,
          "location": "/api/265/",
          "request_text": "Results available at /api/265/",
          "result_id": 265
      }
                              

    (If you use --follow option in httpie you will be automatically redirected to results.)

  • Get your results

    http --follow GET http://bio2byte.be/disomine/api/queue/299
                    
  • Result response example

    {
    "creation_date": "2018-01-03T13:48:23.291721Z",
    "id": 265,
    "results": [
        {
            "disomine": [
                0.4611470401287079,
                0.4550575315952301,
                ...
            ],
            "proteinID": "P01139",
            "sequence": "MSMLFYTLITAFLIGVQ...."
        },
        {
            "disomine": [
                0.43476158380508423,
                0.4361424148082733,
                ....
            ],
            "proteinID": "P67966",
            "sequence": "MPNWGGGKKCGVCQKAV..."
        }
    ]
    }