Skip to content

No category information for node in KG returned from query #143

@saramsey

Description

@saramsey

I have a TRAPI query message,

{
  "message": {
    "query_graph": {
      "edges": {
        "e00": {
          "object": "on",
          "predicates": [
            "biolink:affects"
          ],
          "subject": "sn"
        }
      },
      "nodes": {
        "on": {
          "categories": [
            "biolink:Gene",
            "biolink:Protein"
          ],
          "ids": [
            "NCBIGene:4314"
          ],
          "is_set": false
        },
        "sn": {
          "categories": [
            "biolink:ChemicalEntity"
          ],
          "ids": [
            "CHEBI:29103"
          ],
          "is_set": false
        }
      }
    }
  },
  "parameters": {
    "tiers": [
      1
    ]
  },
  "submitter": "infores:arax"
}

in a file message-arax-sent-to-retriever.json, and when I send that message to the development Retriever API via this command,

curl -s -X POST \
       -d @message-arax-sent-to-retriever.json \
       -H "Accept: application/json" \
       -H "Content-type: application/json" \
        https://dev.retriever.biothings.io/query | jq . > retriever-response.json

I see in the response message's knowledge_graph, a node with id of CHEBI:29103, whose categories attribute is an empty list.

        "CHEBI:29103": {
          "categories": [],
          "attributes": []
        }

or shown as a screen-cap here:
Image

This, despite the fact that NodeNorm provides type information for this node; the NodeNorm query

curl -X 'GET' \
  'https://nodenorm.ci.transltr.io/1.5/get_normalized_nodes?curie=CHEBI%3A29103&conflate=false&drug_chemical_conflate=false&description=false&individual_types=false&include_taxa=false' \
  -H 'accept: application/json'

produces the response

{
  "CHEBI:29103": {
    "id": {
      "identifier": "CHEBI:29103",
      "label": "potassium(1+)"
    },
    "equivalent_identifiers": [
      {
        "identifier": "CHEBI:29103",
        "label": "potassium(1+)"
      },
      {
        "identifier": "CHEBI:26219"
      },
      {
        "identifier": "CHEBI:49685"
      },
      {
        "identifier": "CHEBI:8345"
      },
      {
        "identifier": "UNII:295O53K152",
        "label": "POTASSIUM CATION"
      },
      {
        "identifier": "PUBCHEM.COMPOUND:813",
        "label": "Potassium Cation"
      },
      {
        "identifier": "CHEMBL.COMPOUND:CHEMBL1233793",
        "label": "POTASSIUM ION"
      },
      {
        "identifier": "DRUGBANK:DB01345",
        "label": "Potassium cation"
      },
      {
        "identifier": "MESH:C068616",
        "label": "liver regeneration factor 1"
      },
      {
        "identifier": "CAS:125352-08-1"
      },
      {
        "identifier": "CAS:138363-30-1"
      },
      {
        "identifier": "CAS:24203-36-9"
      },
      {
        "identifier": "HMDB:HMDB0000586",
        "label": "Potassium"
      },
      {
        "identifier": "KEGG.COMPOUND:C00238",
        "label": "Potassium cation"
      },
      {
        "identifier": "INCHIKEY:NPYPAHLBTDXSSS-UHFFFAOYSA-N"
      },
      {
        "identifier": "UMLS:C0597277",
        "label": "potassium ion"
      },
      {
        "identifier": "RXCUI:1318915"
      }
    ],
    "type": [
      "biolink:SmallMolecule",
      "biolink:MolecularEntity",
      "biolink:ChemicalEntity",
      "biolink:PhysicalEssence",
      "biolink:ChemicalOrDrugOrTreatment",
      "biolink:ChemicalEntityOrGeneOrGeneProduct",
      "biolink:ChemicalEntityOrProteinOrPolypeptide",
      "biolink:NamedThing",
      "biolink:PhysicalEssenceOrOccurrent"
    ],
    "information_content": 53.4
  }
}

The empty node categories list in the knowledge graph returned by Retriever is presently causing problems for ARAX. Is it valid TRAPI, and an expected possible return value for a node in the knowledge_graph, to have a node's categories attribute be an empty list? We could kludge around this, but first I thought I would reach out, to better understand if this is normal or unexpected. Thank you!

Metadata

Metadata

Labels

bugSomething isn't workingtier1Concerts Tier 1

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions