Skip to content

Commit

Permalink
do not include records with no curies in qedge
Browse files Browse the repository at this point in the history
  • Loading branch information
rjawesome committed Aug 5, 2024
1 parent 243998e commit 215a423
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/edge_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,8 @@ export default class QueryEdgeManager {
const objectIDs = [record.object.original, record.object.curie, ...record.object.equivalentCuries];

// there must be at least a minimal intersection
const subjectMatch =
subjectIDs.some((curie) => execSubjectCuries.includes(curie)) || execSubjectCuries.length === 0;
const objectMatch = objectIDs.some((curie) => execObjectCuries.includes(curie)) || execObjectCuries.length === 0;

//if both ends match then keep record
const subjectMatch = subjectIDs.some((curie) => execSubjectCuries.includes(curie));
const objectMatch = objectIDs.some((curie) => execObjectCuries.includes(curie));

// Don't keep self-edges
const selfEdge = [...subjectIDs].some((curie) => objectIDs.includes(curie));
Expand Down

0 comments on commit 215a423

Please sign in to comment.