/** * Checks if the type of a Control is inhibition. * @param ctrl Control to check * @return true if type is inhibition related */ public boolean isInhibition(Control ctrl) { return ctrl.getControlType() != null && ctrl.getControlType().toString().startsWith("I"); }
/** * Identifies negative and positive controls. Assumes positive by default. * @param ctrl control to check * @return sign */ protected int sign(Control ctrl) { ControlType type = ctrl.getControlType(); if (type != null && type.name().startsWith("I")) return -1; return 1; }
tgtArrowShape.putMapValue("contains", ArrowShapeVisualProperty.CIRCLE); for (ControlType controlType : ControlType.values()) { if (controlType.toString().startsWith("I")) tgtArrowShape.putMapValue(controlType.toString(), ArrowShapeVisualProperty.T); for (ControlType controlType : ControlType.values()) { if (controlType.toString().startsWith("A")) tgtArrowShape.putMapValue(controlType.toString(), ArrowShapeVisualProperty.DELTA);
private org.opencb.bionetdb.core.models.Regulation createRegulation(BioPAXElement bioPAXElement) { org.opencb.bionetdb.core.models.Regulation regulation = new org.opencb.bionetdb.core.models.Regulation(); Control controlBP = (Control) bioPAXElement; // Common Interaction properties setInteractionCommonProperties(controlBP, regulation); // Regulation properties // controllers Set<Controller> controllers = controlBP.getController(); for (Controller controller: controllers) { regulation.getControllers().add(controller.getRDFId().split("#")[1]); } // controlled Set<Process> controlledProcesses = controlBP.getControlled(); for (Process controlledProcess: controlledProcesses) { regulation.getControlledProcesses().add(controlledProcess.getRDFId().split("#")[1]); } // controlType regulation.setControlType(controlBP.getControlType().toString()); return regulation; }
if(cat.getControlType() != ControlType.ACTIVATION) { error(thing, "range.violated", fix, "controlType", cat.getControlType().name(), "", ControlType.ACTIVATION.name() + " (or empty)"); if(fix) { "controlType", trr.getControlType().name(), "", ControlType.ACTIVATION.name() + " or " + ControlType.INHIBITION.name() + " (or empty)"); if(fix) {
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; }
error(validation, thing, "range.violated", validation.isFix(), "controlType", cat.getControlType().name(), "", ControlType.ACTIVATION.name() + " (or empty)"); if(validation.isFix()) { trr.getControlType().name(), "", ControlType.ACTIVATION.name() + " or " + ControlType.INHIBITION.name() + " (or empty)"); if(validation.isFix()) {
/** * 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"); } } }
ctrl.getControlType().toString().startsWith("I") ? BinaryInteractionType.DOWNREGULATE_EXPRESSION : BinaryInteractionType.UPREGULATE_EXPRESSION;