private org.opencb.bionetdb.core.models.Catalysis createCatalysis(BioPAXElement bioPAXElement) { org.opencb.bionetdb.core.models.Catalysis catalysis = new org.opencb.bionetdb.core.models.Catalysis(); Catalysis catalysisBP = (Catalysis) bioPAXElement; // Common Interaction properties setInteractionCommonProperties(catalysisBP, catalysis); // Catalysis properties // controllers Set<Controller> controllers = catalysisBP.getController(); for (Controller controller: controllers) { catalysis.getControllers().add(controller.getRDFId().split("#")[1]); } // controlled Set<Process> controlledProcesses = catalysisBP.getControlled(); for (Process controlledProcess: controlledProcesses) { catalysis.getControlledProcesses().add(controlledProcess.getRDFId().split("#")[1]); } // controlType catalysis.setControlType(catalysisBP.getControlType().toString()); // cofactor Set<PhysicalEntity> cofactors = catalysisBP.getCofactor(); for (PhysicalEntity cofactor: cofactors) { catalysis.getCofactors().add(cofactor.getRDFId().split("#")[1]); } return catalysis; }
Set<PhysicalEntity> cofs = ((Catalysis) ctrl).getCofactor(); Glyph g = handlePEGroup(cofs, convertID(ctrl.getUri())); if (g != null)
/** * Adds a BioPAX Control Interaction. */ private void addControlInteraction(CyNetwork network, Control control) { Collection<Process> controlledList = control.getControlled(); for (Process process : controlledList) { // Determine the BioPAX Edge Type String typeStr = "controlled"; //default ControlType cType = control.getControlType(); typeStr = (cType == null) ? typeStr : cType.toString(); //edge direction (trick) - from control to process (like for 'right', 'cofactor', 'participant') linkNodes(network, process, control, typeStr); } Collection<Controller> controllerList = control.getController(); for (Controller controller : controllerList) { // directed edge - from Controller to Control (like 'left') linkNodes(network, control, controller, "controller"); } // cofactor relationships if(control instanceof Catalysis) { Collection<PhysicalEntity> coFactorList = ((Catalysis) control).getCofactor(); for(PhysicalEntity cofactor : coFactorList) { // direction - from control to cofactor (like 'right', 'participant', 'controlled') linkNodes(network, control, cofactor, "cofactor"); } } }