Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
117 lines (99 sloc) 5.77 KB

OpenTox REST API: Algorithm

Provides access to OpenTox algorithms.

JSON

OpenTox mandatory representation of REST resources is RDF (W3C Resource Description Framework). Examples: 1,2.

The JSON representation is a new development, implemented in AMBIT web services 1,2.

  • The algorithm JSON representation closely follows the RDF data model;

  • The JSON or JSONP representation could be retrieved via HTTP Accept headers "application/json" or "application/x-javascript" respectively.

  • As a workaround for web browsers restriction, the URI parameter ?media=application/json or ?media=application/x-javascript could be used.

{
    "algorithm": [
        {
            "uri": "http://host:port/ambit2/algorithm/SimpleKMeans",
            "id": "SimpleKMeans",
            "name": "Clustering: k-means",
            "type": [
                "http://www.opentox.org/algorithmTypes.owl#Clustering",
                "http://www.opentox.org/algorithmTypes.owl#SingleTarget",
                "http://www.opentox.org/algorithmTypes.owl#LazyLearning",
                "http://www.opentox.org/algorithmTypes.owl#UnSupervised"
            ]
        },
        {
            "uri": "http://host:port:8080/ambit2/algorithm/J48",
            "id": "J48",
            "name": "Classification: Decision tree J48",
            "type": [
                "http://www.opentox.org/algorithmTypes.owl#Classification",
                "http://www.opentox.org/algorithmTypes.owl#SingleTarget",
                "http://www.opentox.org/algorithmTypes.owl#EagerLearning",
                "http://www.opentox.org/algorithmTypes.owl#Supervised"
            ]
        },
        {
            "uri": "http://host:port/ambit2/algorithm/LR",
            "id": "LR",
            "name": "Regression: Linear regression",
            "type": [
                "http://www.opentox.org/algorithmTypes.owl#Regression",
                "http://www.opentox.org/algorithmTypes.owl#SingleTarget",
                "http://www.opentox.org/algorithmTypes.owl#EagerLearning",
                "http://www.opentox.org/algorithmTypes.owl#Supervised"
            ]
        },
        {
            "uri": "http://host:port/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.XLogPDescriptor",
            "id": "org.openscience.cdk.qsar.descriptors.molecular.XLogPDescriptor",
            "name": "XLogP",
            "endpoint": "http://www.opentox.org/echaEndpoints.owl#Octanol-water_partition_coefficient_Kow",
            "implementationOf": "http://www.blueobelisk.org/ontologies/chemoinformatics-algorithms/#xlogP",
            "type": [
                "http://www.opentox.org/algorithmTypes.owl#DescriptorCalculation"
            ]
        },
        {
            "uri": "http://host:port/ambit2/algorithm/toxtreecramer",
            "id": "toxtreecramer",
            "name": "ToxTree: Cramer rules",
            "endpoint": "http://www.opentox.org/echaEndpoints.owl#HumanHealthEffects",
            "implementationOf": "http://ambit.sourceforge.net/descriptors.owl#toxtreecramer",
            "type": [
                "http://www.opentox.org/algorithmTypes.owl#Rules"
            ]
        }
    ]
}

cURL examples:

Retrieve the list of Descriptor calculation algorithms

curl -H "Accept:application/x-javascript" "http://apps.ideaconsult.net:8080/ambit2/algorithm?type=DescriptorCalculation"

Retrieve the list of Classification algorithms

curl "http://apps.ideaconsult.net:8080/ambit2/algorithm?type=Classification&media=application/json"

Retrieve the list of Regression algorithms

curl -H "Accept:application/json" http://apps.ideaconsult.net:8080/ambit2/algorithm?type=Regression

Retrieve the list of algorithms based on Expert rules

curl "http://apps.ideaconsult.net:8080/ambit2/algorithm?type=Rules&media=application/x-javascript" 

Retrieve the list of Applicability domain algorithms

curl "http://apps.ideaconsult.net:8080/ambit2/algorithm?type=AppDomain&media=application/x-javascript"

The ontology entries