Skip to content

Minerva Model Search API

goodb edited this page Jul 17, 2020 · 5 revisions

Testing service for developers running at: http://noctua-dev.berkeleybop.org:6800/search/models/

Notes:

  • The service responds to either GET or POST HTTP requests.
  • Unless otherwise noted below, multiple values for a given parameter are allowed and are added by repeating the parameter in the request. e.g. ?gp=WB:WBGene00011979&gp=WB:WBGene00011980&gp=WB:WBGene00011981
  • Parameter combinations are allowed.
  • The search works over RDF databases, hence everything actually runs using IRIs. That being said, an effort is made to handle curies in input fields by converting them to IRIs. e.g. the system should respond the same to WB:WBGene00011979 as it does to http://identifiers.org/wormbase/WBGene00011979
Parameter Format Comment Example
taxon int, curie, or IRI Finds models that incorporate a gene in the specified taxon http://noctua-dev.berkeleybop.org:6800/search/models/?taxon=7955
gp curie or IRI find models by gene http://noctua-dev.berkeleybop.org:6800/search/models/?gp=WB:WBGene00011979 http://noctua-dev.berkeleybop.org:6800/search/models/?gp=http://identifiers.org/wormbase/WBGene00001865
term curie or IRI Finds models that used the specific ontology term (need to add 'expand' parameter for closure search). Applies to any loaded ontology (e.g. GO, CL, some anatomy ontologies..) http://noctua-dev.berkeleybop.org:6800/search/models/?term=http://purl.obolibrary.org/obo/WBbt_0006748
expand no value If added to a search request that includes an ontology term, will add the subclasses of the search term to the search ("query expansion") http://noctua-dev.berkeleybop.org:6800/search/models/?term=http://purl.obolibrary.org/obo/GO_0140312&expand=
pmid curie (No IRI for this one) http://noctua-dev.berkeleybop.org:6800/search/models/?pmid=PMID:17728253
state {development, production, closed, review, delete} http://noctua-dev.berkeleybop.org:6800/search/models/?state=review
contributor ORCID IRI http://noctua-dev.berkeleybop.org:6800/search/models/?contributor=http://orcid.org/0000-0002-1706-4196
group group IRI http://noctua-dev.berkeleybop.org:6800/search/models/?group=http://www.wormbase.org
exactdate YYYY-MM-DD Only models created/updated? on exactly that date http://noctua-dev.berkeleybop.org:6800/search/models/?exactdate=2019-07-12
date YYYY-MM-DD Could be called start date. Returns models created/updated on or after the specified date http://noctua-dev.berkeleybop.org:6800/search/models/?date=2019-07-12
dateend YYYY-MM-DD Use with date to provide a range for the search http://noctua-dev.berkeleybop.org:6800/search/models/?date=2019-07-12&&dateend=2020-01-12
offset int Use with limit to step (page) through long result lists http://noctua-dev.berkeleybop.org:6800/search/models/?taxon=7955&offset=10&limit=10
limit int defaults to 1000 if not specified http://noctua-dev.berkeleybop.org:6800/search/models/?gp=WB:WBGene00001865&limit=5
count No parameter. If present, will just return the count of the results that would be obtained given the other parameters added http://noctua-dev.berkeleybop.org:6800/search/models/?taxon=7955&count

Response example:

{
  "n": 2,
  "models": [
    {
      "id": "gomodel:568b0f9600000284",
      "date": "2018-12-11",
      "title": "C. elegans defense response to Gram negative bacterium in the intestine",
      "state": "development",
      "contributors": [
        "http://orcid.org/0000-0002-1706-4196",
        "http://orcid.org/0000-0002-3013-9906"
      ],
      "groups": [
        "http://www.wormbase.org"
      ],
      "query_match": {
        "http://identifiers.org/wormbase/WBGene00011979": [
          "http://model.geneontology.org/568b0f9600000284/580685bd00000134"
        ]
      }
    },
    {
      "id": "gomodel:c360eb0b-6ac5-4418-b3ae-c0e550ac4c55",
      "date": "2020-3-10",
      "title": "WB:WBGene00011979",
      "state": "development",
      "contributors": [
        "http://orcid.org/0000-0002-6659-0416"
      ],
      "groups": [
        "http://geneontology.org"
      ],
      "query_match": {
        "http://identifiers.org/wormbase/WBGene00011979": [
          "http://model.geneontology.org/c360eb0b-6ac5-4418-b3ae-c0e550ac4c55/95b97753-62e2-469e-aba0-955bfd9fcf76",
          "http://model.geneontology.org/c360eb0b-6ac5-4418-b3ae-c0e550ac4c55/4e34e3a4-6199-4ecb-8844-6b77acc0e23c",
          "http://model.geneontology.org/c360eb0b-6ac5-4418-b3ae-c0e550ac4c55/ff782db7-3ca6-42c4-a184-a9391582d978"
        ]
      }
    }
  ],
  "sparql": "PREFIX owl: \u003chttp://www.w3.org/2002/07/owl#\u003e \nPREFIX rdf: \u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#\u003e \n#model metadata\nPREFIX metago: \u003chttp://model.geneontology.org/\u003e\nPREFIX lego: \u003chttp://geneontology.org/lego/\u003e \n#model data\nPREFIX part_of: \u003chttp://purl.obolibrary.org/obo/BFO_0000050\u003e\nPREFIX occurs_in: \u003chttp://purl.obolibrary.org/obo/BFO_0000066\u003e\nPREFIX enabled_by: \u003chttp://purl.obolibrary.org/obo/RO_0002333\u003e\nPREFIX has_input: \u003chttp://purl.obolibrary.org/obo/RO_0002233\u003e\nPREFIX has_output: \u003chttp://purl.obolibrary.org/obo/RO_0002234\u003e\nPREFIX causally_upstream_of: \u003chttp://purl.obolibrary.org/obo/RO_0002411\u003e\nPREFIX provides_direct_input_for: \u003chttp://purl.obolibrary.org/obo/RO_0002413\u003e\nPREFIX directly_positively_regulates: \u003chttp://purl.obolibrary.org/obo/RO_0002629\u003e\n\nSELECT  ?id ?date ?title ?state  ?ind1 (GROUP_CONCAT(DISTINCT ?contributor;separator\u003d\";\") AS ?contributors) (GROUP_CONCAT(DISTINCT ?group;separator\u003d\";\") AS ?groups)    \nWHERE {\n  GRAPH ?id {  \n        ?id \u003chttp://purl.org/dc/elements/1.1/title\u003e ?title ;\n           \u003chttp://purl.org/dc/elements/1.1/date\u003e ?date ;\n           \u003chttp://purl.org/dc/elements/1.1/contributor\u003e ?contributor ;   \n        optional{?id \u003chttp://purl.org/pav/providedBy\u003e ?group } .   \n        optional{?id lego:modelstate ?state } .    \n      ?ind1 rdf:type \u003chttp://identifiers.org/wormbase/WBGene00011979\u003e . \n \n      \n      \n       \n      \n      \n      \n      \n    }\n  } \n  GROUP BY ?id ?date ?title ?state  ?ind1 \n  ORDER BY desc(?date) desc(?id)   \nLIMIT 1000\n\n\n "
}

relevant tickets: https://github.com/geneontology/minerva/issues/230

Clone this wiki locally