Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRAPI 1.4 validation error from automat-gtopdb edge: empty attribute value #700

Closed
colleenXu opened this issue Aug 17, 2023 · 3 comments
Closed
Labels
external Requires fixes to an external service trapi 1.4

Comments

@colleenXu
Copy link
Collaborator

I was doing a quick performance review of the BTE "chem-affects-gene" templates, and I used my notebook to run TRAPI validation on some responses.

The response that raised this validation error is > 25 MB so I can't attach it, but I'll include the query I ran below. Notes on how I ran the query:

  • it took me 3 min 2 s to run
  • had 500 results
  • I was running with INSTANCE_ENV=ci (so the server urls for automat KPs were CI instance ones)
query: gabapentin increases activity/abundance of what?
{
    "message": {
        "query_graph": {
            "nodes": {
                "start": {
                    "categories": ["biolink:ChemicalEntity"],
                    "ids": ["PUBCHEM.COMPOUND:3446"]
                },
                "end": {
                    "categories": ["biolink:Gene"]
                }
            },
            "edges": {
                "t_edge": {
                    "subject": "start",
                    "object": "end",
                    "predicates": ["biolink:affects"],
                    "knowledge_type": "inferred",
                    "qualifier_constraints": [
                        {
                            "qualifier_set": [
                                {
                                    "qualifier_type_id": "biolink:object_aspect_qualifier",
                                    "qualifier_value": "activity_or_abundance"
                                },
                                {
                                    "qualifier_type_id": "biolink:object_direction_qualifier",
                                    "qualifier_value": "increased"
                                }
                            ]
                        }
                    ]
                }
            }
        }
    }
}

The reasoner-validator raised the error: error.knowledge_graph.edge.attribute.value.empty. Note that "errors" are "orange" in the ARAX UI, vs the red for "critical" errors.

This error comes from 1 specific KG edge, which is from Automat GtopDB. Example error code and object from my notebook (python):

error.knowledge_graph.edge.attribute.value.empty

{'infores:gtopdb -> infores:automat-gtopdb -> infores:biothings-explorer': {'PUBCHEM.COMPOUND:3446[biolink:SmallMolecule]--biolink:affects->NCBIGene:3786[biolink:Gene]': None}}

I'm not sure why this validation error is being raised. I think I've identified the edge...but its edge-attributes don't have empty stuff in the value field. Maybe it's the value false (which only shows up as an edge-attribute value in this edge)?

Edge ID: 3e21149474a2f5bb54ebe73cee7984dd

edge contents
{
  "predicate": "biolink:affects",
  "subject": "PUBCHEM.COMPOUND:3446",
  "object": "NCBIGene:3786",
  "qualifiers": [
    {
      "qualifier_type_id": "biolink:object_direction_qualifier",
      "qualifier_value": "increased"
    },
    {
      "qualifier_type_id": "biolink:qualified_predicate",
      "qualifier_value": "biolink:causes"
    },
    {
      "qualifier_type_id": "biolink:object_aspect_qualifier",
      "qualifier_value": "activity"
    }
  ],
  "attributes": [
    {
      "attribute_type_id": "aragorn:endogenous",
      "value": false,
      "value_type_id": "xsd:boolean",
      "original_attribute_name": "endogenous",
      "value_url": null,
      "attribute_source": null,
      "description": null,
      "attributes": null
    },
    {
      "attribute_type_id": "biolink:Attribute",
      "value": 8.279999732971191,
      "value_type_id": "EDAM:data_0006",
      "original_attribute_name": "affinity",
      "value_url": null,
      "attribute_source": null,
      "description": null,
      "attributes": null
    },
    {
      "attribute_type_id": "biolink:Attribute",
      "value": false,
      "value_type_id": "EDAM:data_0006",
      "original_attribute_name": "primaryTarget",
      "value_url": null,
      "attribute_source": null,
      "description": null,
      "attributes": null
    },
    {
      "attribute_type_id": "biolink:publications",
      "value": [
        "PMID:30021858"
      ],
      "value_type_id": "EDAM:data_0006",
      "original_attribute_name": "publications",
      "value_url": null,
      "attribute_source": null,
      "description": null,
      "attributes": null
    },
    {
      "attribute_type_id": "biolink:Attribute",
      "value": "pEC50",
      "value_type_id": "EDAM:data_0006",
      "original_attribute_name": "affinityParameter",
      "value_url": null,
      "attribute_source": null,
      "description": null,
      "attributes": null
    }
  ],
  "sources": [
    {
      "resource_id": "infores:automat-gtopdb",
      "resource_role": "aggregator_knowledge_source",
      "upstream_resource_ids": [
        "infores:gtopdb"
      ],
      "source_record_urls": null
    },
    {
      "resource_id": "infores:gtopdb",
      "resource_role": "primary_knowledge_source",
      "upstream_resource_ids": null,
      "source_record_urls": null
    },
    {
      "resource_id": "infores:biothings-explorer",
      "resource_role": "aggregator_knowledge_source",
      "upstream_resource_ids": [
        "infores:automat-gtopdb"
      ]
    }
  ]
}
@colleenXu colleenXu added trapi 1.4 external Requires fixes to an external service labels Aug 17, 2023
@colleenXu
Copy link
Collaborator Author

I consider this less important and unlikely to cause issues downstream...but maybe it'd be good to ask about this anyways?

And I think this should be brought up with Automat devs (Ranking Agent?) and that they should take the lead on data-modeling / reasoner-validator discussions.

@andrewsu
Copy link
Member

Per this discussion on slack, this error is a false positive by the validator, to be fixed in the next release. Closing this issue...

@colleenXu
Copy link
Collaborator Author

I used reasoner-validator 3.8.6 locally to validate the same saved response that originally triggered this error.

The error wasn't raised anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external Requires fixes to an external service trapi 1.4
Projects
None yet
Development

No branches or pull requests

2 participants