From 3efc3f2e210e16da31e2324be749ff8f84363c6e Mon Sep 17 00:00:00 2001 From: Jackson Callaghan <43009413+tokebe@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:23:38 -0400 Subject: [PATCH] Revert "do not allow edge attribtues with same type id for trapi" --- src/graph/knowledge_graph.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/graph/knowledge_graph.ts b/src/graph/knowledge_graph.ts index da84614..a3a4cc6 100644 --- a/src/graph/knowledge_graph.ts +++ b/src/graph/knowledge_graph.ts @@ -175,7 +175,6 @@ export default class KnowledgeGraph { //handle TRAPI APIs (Situation A of https://github.com/biothings/BioThings_Explorer_TRAPI/issues/208) and APIs that define 'edge-atributes' in x-bte const seenPmids = new Set(); - const seenAttrs = new Set(); kgEdge.attributes['edge-attributes']?.forEach((attribute) => { // Do not add multiple SemmedDB sentences/other "supporting study results" from the same publication if (attribute.attribute_type_id === "biolink:has_supporting_study_result" && attribute?.attributes?.find((attr) => attr.attribute_type_id === "biolink:publications")) { @@ -187,11 +186,7 @@ export default class KnowledgeGraph { } seenPmids.add(publication); } - // Do not add duplicate attributes for TRAPi - else if (seenAttrs.has(attribute.attribute_type_id)) { - return; - } - seenAttrs.add(attribute.attribute_type_id); + attributes.push(attribute); });