Skip to content

Commit

Permalink
hardcode treats predicate
Browse files Browse the repository at this point in the history
  • Loading branch information
Woozl committed May 17, 2024
1 parent 36bc954 commit b17fe6a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/stores/useBiolinkModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ export default function useBiolinkModel() {
* @returns {object[]} list of predicate objects
*/
function getEdgePredicates() {
const newPredicates =
Object.entries(biolinkModel.slots)
.filter(checkIfDescendantOfRelatedTo)
.map(([identifier, predicate]) => ({
predicate: strings.edgeFromBiolink(identifier),
domain: strings.nodeFromBiolink(predicate.domain),
range: strings.nodeFromBiolink(predicate.range),
}));
return newPredicates;
const newPredicates = Object.entries(biolinkModel.slots).filter(checkIfDescendantOfRelatedTo);
// hard code in treats, it's techincally not a descendant of `related to`
// TODO: we'll want the more correct parsing using mixins at some point
newPredicates.push(['treats', biolinkModel.slots.treats]);
return newPredicates.map(([identifier, predicate]) => ({
predicate: strings.edgeFromBiolink(identifier),
domain: strings.nodeFromBiolink(predicate.domain),
range: strings.nodeFromBiolink(predicate.range),
}));
}

/**
Expand Down

0 comments on commit b17fe6a

Please sign in to comment.