/** * Gets the direction of the Control, if exists. * @param cont Control to get its direction * @return the direction of the Control */ protected ConversionDirectionType getCatalysisDirection(Control cont) { if (cont instanceof Catalysis) { CatalysisDirectionType catDir = ((Catalysis) cont).getCatalysisDirection(); if (catDir == CatalysisDirectionType.LEFT_TO_RIGHT) { return ConversionDirectionType.LEFT_TO_RIGHT; } else if (catDir == CatalysisDirectionType.RIGHT_TO_LEFT) { return ConversionDirectionType.RIGHT_TO_LEFT; } } return null; }
/** * Continues the inference from the Catalysis of seed element. * @param interactionSet inferred interactions * @param aCatalysis the catalysis to follow * @param bpe source of the interaction */ private void processCatalysis(InteractionSetL3 interactionSet, Catalysis aCatalysis, BioPAXElement bpe) { //We have to consider two direction statements //Catalysis.direction and Conversion.spontaneous //This method maps the former to the compatible latter //null means reversible or unknown, both are treated in the same way. ConversionDirectionType catalysisDirection = mapDirectionToConversion(aCatalysis.getCatalysisDirection()); //get the conversions and process them. Set<Process> controlled = aCatalysis.getControlled(); for (Process process : controlled) { assert process instanceof Conversion; Conversion aConversion = (Conversion) process; //let's find the direction that is compatible with catalysis direction ConversionDirectionType dirA = findConsensusDirection(catalysisDirection, aConversion.getConversionDirection()); assert dirA != null; //and let's get the interacting physical entities createInteractions(aConversion, dirA, aCatalysis, interactionSet, bpe); } }
mapDirectionToConversion(consequentCatalysis.getCatalysisDirection()); ConversionDirectionType dirB = findConsensusDirection(nextConversion.getConversionDirection(), direction2);
if(proc instanceof Catalysis) CatalysisDirectionType cdir = ((Catalysis) proc).getCatalysisDirection(); if(cdir != null && cdir != correctDir) { error(step, "direction.conflict", fix,
if(proc instanceof Catalysis) CatalysisDirectionType cdir = ((Catalysis) proc).getCatalysisDirection(); if(cdir != null && cdir != correctDir) { error(validation, step, "direction.conflict", validation.isFix(),