Sign inSign up

tomtoothfairies/panacea

By tomtoothfairies

•Updated over 9 years ago

The cure-all

Image
0

995

tomtoothfairies/panacea repository overview

⁠Panacea

Service responsible for the UI and PML analysis. The UI is a web app available at localhost:4000⁠. Panacea depends on both Asclepius and Chiron to provide DDI analysis, these must be running for Panacea to work.

⁠Api Endpoints

All API endpoints require a valid authorization token to be provided. The token can be sent in the Authorization header or as the authorization_token query parameter.

Tokens can be generated using: Panacea.AccessToken.generate()

⁠/api/pml
DescriptionValidate a PML file and find the drugs it contains
MethodsPOST
ParametersAn object containing the file to be analysed
ReturnsResponse detailed below, or an error object
⁠Example
⁠Response Body
{
  "drugs": [
    {
      "label": "paracetamol",
      "line": 12
    },
    {
      "label": "cocaine",
      "line": 2
    }
  ],
  "unnamed": [
    {
      "type": "task",
      "line": 3
    },
    {
      "type": "sequence",
      "line": 6
    }
  ],
  "clashes": [
    {
      "name": "some_action",
      "occurrences": [
        {"line": 9, "type": "action"},
        {"line": 3, "type": "action"}
      ]
    }
  ],
  "ast": "AST representation of the provided PML file - base64 encoded"
}
⁠/api/uris
DescriptionFor a given list of drug labels, find their DINTO URI
MethodsPOST
Request BodyAn object containing a list of drug labels, named labels
ReturnsResponse detailed below or and error object
⁠Example
⁠Request Body
{"labels": [ "paracetamol", "flat seven up", "cocaine"]}
⁠Response Body
{
  "uris": {
    "found": [
      {
        "label": "cocaine",
        "uri": "http://purl.obolibrary.org/obo/CHEBI_27958"
      },
      {
        "label": "paracetamol",
        "uri": "http://purl.obolibrary.org/obo/CHEBI_46195"
      }
    ],
    "not_found": [
      "flat seven up"
    ]
  }
}
⁠/api/ddis
DescriptionFind all drug-drug interactions (DDI) in the DINTO ontology which involve only the given drugs, in the context of the given AST
MethodsPOST
Request BodyAn object containing a list of drugs and an AST
ReturnsResponse detailed below, or an error object
⁠Example
⁠Request Body
{
  "drugs": [
    {
      "uri": "http://purl.obolibrary.org/obo/DINTO_DB00214",
      "label": "torasemide"
    },
    {
      "uri": "http://purl.obolibrary.org/obo/DINTO_DB00519",
      "label": "trandolapril"
    }
  ],
  "ast": "encoded AST returned from /api/pml"
}
⁠Response Body
{
  "ddis": [
    {
      "drug_a": {
        "uri": "http://purl.obolibrary.org/obo/DINTO_DB00214",
        "label": "torasemide",
        "line": 3
      },
      "drug_b": {
        "uri": "http://purl.obolibrary.org/obo/DINTO_DB00519",
        "label": "trandolapril",
        "line": 6
      },
      "label": "torasemide/trandolapril DDI",
      "uri": "http://purl.obolibrary.org/obo/DINTO_11031",
      "harmful": true,
      "spacing": 2,
      "unit": "yr",
      "agonism": true,
      "category": "sequential",
      "enclosing_constructs": [
        {
          "type": "sequence",
          "line": 6
        }
      ]
    }
  ]
}
⁠/api/ast
DescriptionConvert an PML AST into a PML Document
MethodsPOST
ParametersAn object containing the pml ast to be converted
ReturnsThe PML document as an attachment named pml-tx.pml, or an error object
⁠Error Objects

All error responses take have the following format:

{
  "error": {
    "status_code": "http status code",
    "title": "string summarising the error",
    "detail": "string explaining the specific error",
    "meta": "object containing error specific metadata"
  }
}

Tag summary

Content type

Image

Digest

Size

145.8 MB

Last updated

over 9 years ago

docker pull tomtoothfairies/panacea