/** * 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; }
private String printControls(Map<Control, Boolean> dc) { StringBuilder ctString = new StringBuilder(); for (Control control : dc.keySet()) { Boolean direction = dc.get(control); ctString.append(direction ? "Lost activity:" : "Gained activity").append(":").append( control.getControlType()); for (Process process : control.getControlled()) { ctString.append(process.getName()).append(" ,"); } ctString.append("; "); } return ctString.toString(); }
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; }
ControlType type = ctrl.getControlType(); if (type == null)
BinaryInteractionType type = ctrl.getControlType() != null && ctrl.getControlType().toString().startsWith("I") ? BinaryInteractionType.DOWNREGULATE_EXPRESSION : BinaryInteractionType.UPREGULATE_EXPRESSION;
/** * 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"); } } }
public void check(Control thing, boolean fix) { if(thing.getControlType() != null)
public void check(final Validation validation, Control thing) { if(thing.getControlType() != null)