Skip to content

Add QualifierConstraint.qualified_predicate property  #368

@mbrush

Description

@mbrush

On a recent TRAPI call, we discussed the requirement to allow specification of the qualified predicate that pairs with a set of qualifiers used to constrain a query, so the query itself is clear and complete. This came up in the context of the example query Sierra presented here - where a constraint on the qualified predicate had to be captured in a Qualifier object (even though qualified predicates are not themselves considered to be Qualifiers).

To better accommodate this requirement, we propose adding a new property to the QualifierConstraint object called qualified_predicate with cardinality 0..1, that would sit alongside the existing qualifier_set property.

  • QualifierConstraint.qualified_predicate: the qualified predicate that pairs with the qualifiers specified in a qualifier set. As part of a QueryConstraint, this qualified predicate must be present with the constrained qualifiers in order for a given Edge to be returned. This property is not required in a QualifierConstraint object however, as not all qualified Edges in knowledge graphs include a qualified predicate.

We also propose the following updates to descriptions of existing objects and properties, which we feel provide additional clarification.

  • Qedge.qualifier_constraints: a list of QualifierConstraints that constrain a query to match specified patterns of qualifiers that must be present on an Edge.

  • QualifierConstraint: Defines a query constraint based on the types and values of qualifiers in an Edge. This constraint may optionally include the qualified predicate that pairs with these qualifiers to provide a precise reading of the full statement expressed in the Edge. For example, we us this to constrain a "ChemicalX - affects - ?Gene" query to return only edges where ChemicalX specifically 'increases' the 'expression' of the Gene, by requiring the Edge to have an object_aspect_qualifier with the value "expression", an object_direction_qualifier with the value "increased", and a qualified_predicate with the value "causes".

  • QualifierConstraint.qualifier_set: a set of one or more Qualifiers that are found in a single Edge. As part of a QueryConstraint, this set of qualifiers must be found together on a given Edge in order for that Edge to be returned.

  • QualifierConstraint.qualified_predicate: the qualified predicate that pairs with the qualifiers specified in a qualifier set. As part of a QueryConstraint, this qualified predicate must be present with the specified qualifiers in a given Edge in order for it to be returned. This property is not required in a QualifierConstraint however, as not all Edges in a knowledge graph that contain qualifiers include a qualified predicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions