From b38059a9c4e65e70b46dd840e46a5ca7a2a36972 Mon Sep 17 00:00:00 2001 From: Chris Mungall Date: Thu, 20 Feb 2025 15:56:58 -0800 Subject: [PATCH] allow any predicates to be specified from cliqueRelations previously hardwired to be either xref of equivalent_to --- lib/obographviz.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/obographviz.js b/lib/obographviz.js index f6595f5..348d4d4 100644 --- a/lib/obographviz.js +++ b/lib/obographviz.js @@ -180,6 +180,7 @@ class OboGraphViz { + var cliques = []; if (styleMap.cliqueRelations) { var cx = new CliqueIndex(); @@ -202,7 +203,15 @@ class OboGraphViz { } } } - + for (let i = 0; i < og.graphs.length; i++) { + var g = og.graphs[i]; + var edges = g.edges; + var clique_edges = edges.filter(e => styleMap.cliqueRelations.indexOf(e.pred) > -1); + for (let e of clique_edges) { + ensl.push({ nodeIds: [e.sub, e.obj] }); + } + } + var cliques = cx.findMaximalCliques(ensl); }