/** * @param ac * @return * @see net.sourceforge.ondex.core.ONDEXGraph#getConceptsOfTag(net.sourceforge.ondex.core.ONDEXConcept) */ public Set<ONDEXConcept> getConceptsOfTag(ONDEXConcept ac) { return og.getConceptsOfTag(ac); }
@Override protected Set<ONDEXConcept> retrieveConceptAllTag(ONDEXConcept concept) { return parent.getConceptsOfTag(concept); }
@Override public boolean accepts() { ONDEXGraph graph = viewer.getONDEXJUNGGraph(); for (ONDEXConcept n : entities) { if (!graph.getConceptsOfTag(n).isEmpty()) return true; } return false; }
@Override public boolean accepts() { ONDEXGraph graph = viewer.getONDEXJUNGGraph(); for (ONDEXConcept n : entities) { if (!graph.getConceptsOfTag(n).isEmpty()) return true; } return false; }
ONDEXConcept context = graph.getConcept(cId); Set<ONDEXConcept> newConcepts = graph.getConceptsOfTag(context); Set<ONDEXRelation> newRelations = graph.getRelationsOfTag(context); ONDEXConcept context2 = graph.getConcept(cId2); Set<ONDEXConcept> viewCon1 = graph.getConceptsOfTag(context1); Set<ONDEXConcept> viewCon2 = graph.getConceptsOfTag(context2); Set<ONDEXRelation> viewRel1 = graph.getRelationsOfTag(context1); Set<ONDEXRelation> viewRel2 = graph.getRelationsOfTag(context2);
public static void countMembers(OVTK2PropertiesAggregator viewer, String clsOfConctext, String clsOfMemeber) { ONDEXGraph graph = viewer.getONDEXJUNGGraph(); AttributeName an = createAttName(graph, clsOfMemeber + "_members", Double.class); ConceptClass cls = createCC(graph, clsOfMemeber); for (ONDEXConcept c : graph.getConceptsOfConceptClass(createCC(graph, clsOfConctext))) { Double count = 0d; for (ONDEXConcept oc : graph.getConceptsOfTag(c)) { if (oc.getOfType().equals(cls)) { count++; } } c.createAttribute(an, count, false); } }
/** * Copies all context information from old concept to new concept and * updates context references on other entities. * * @param oldC * old ONDEXConcept * @param newC * new ONDEXConcept */ private void copyContext(ONDEXConcept oldC, ONDEXConcept newC) { // add new concept to same references as old concept for (ONDEXConcept c : graph.getConceptsOfTag(oldC)) { c.addTag(newC); } for (ONDEXRelation r : graph.getRelationsOfTag(oldC)) { r.addTag(newC); } // transfer context from old concept to new concept for (ONDEXConcept c : oldC.getTags()) { newC.addTag(c); } }
view.retainAll(graph.getConceptsOfTag(context));
seeds.put(root, graph.getConceptsOfTag(root));
/** * Counts the number of context members of particular class and stores this * value in a attribute with specified name. * * @param viewer * - Ovtk2 viewer * @param membersClass * - class of members to count * @param arg_name * - name of an argument for storing the count */ public static void annotationByContextCounter(OVTK2PropertiesAggregator viewer, String membersClass, String arg_name) { ONDEXGraph graph = viewer.getONDEXJUNGGraph(); AttributeName an = createAttName(graph, arg_name, Double.class); Set<ONDEXConcept> ccRestriction = graph.getConceptsOfConceptClass(createCC(graph, membersClass)); for (ONDEXConcept context : graph.getConcepts()) { Set<ONDEXConcept> members = graph.getConceptsOfTag(context); int count = BitSetFunctions.and(ccRestriction, members).size(); if (count > 0) { context.createAttribute(an, count, false); } } }
contexts = BitSetFunctions.or(concept.getTags(), graphInput.getConceptsOfTag(concept)); } else { contexts.addAll(BitSetFunctions.or(concept.getTags(), graphInput.getConceptsOfTag(concept)));
contexts = BitSetFunctions.or(concept.getTags(), graphInput.getConceptsOfTag(concept)); } else { contexts.addAll(BitSetFunctions.or(concept.getTags(), graphInput.getConceptsOfTag(concept)));
public static void colourByContexts(OVTK2PropertiesAggregator viewer) { ONDEXGraph graph = viewer.getONDEXJUNGGraph(); Color color = JColorChooser.showDialog(OVTK2Desktop.getInstance().getMainFrame(), "Choose Background Color", Color.blue); if (color == null) return; System.err.println(color); PickedState<ONDEXConcept> state = viewer.getVisualizationViewer().getPickedVertexState(); Set<ONDEXConcept> set = state.getPicked(); for (ONDEXConcept n : set) { ONDEXConcept context = graph.getConcept(n.getId()); Annotation.setColor(viewer, context, color); for (ONDEXConcept c : graph.getConceptsOfTag(context)) { Annotation.setColor(viewer, c, color); } } }
tagRefsConcepts.addAll(graph.getConceptsOfTag(concept));
List<Subgraph> matches = StandardFunctions.getSubgraphMatch(graph, pattern); Set<ONDEXConcept> pathways = graph.getConceptsOfConceptClass(createCC(graph, "Path")); Set<ONDEXConcept> listMembers = graph.getConceptsOfTag(list); for (Subgraph match : matches) { if (BitSetFunctions.and(match.getConcepts(), listMembers).size() == 0) {
if (cId != null) { ONDEXConcept chromosome = graph.getConcept(cId); conceptsOfContext = graph.getConceptsOfTag(chromosome);