private void fix(BiochemicalPathwayStep t, Object... values) { if(values[0] instanceof Catalysis) { ((Catalysis)values[0]).setCatalysisDirection((CatalysisDirectionType) values[1]); } else if (values[0] instanceof Conversion){ ((Conversion)values[0]).setConversionDirection((ConversionDirectionType) values[1]); } }
/** * Gets the ID of the reference of the given entity if it is a small molecule. */ private String getSMRID(PhysicalEntity pe) { if (pe instanceof SmallMolecule) { EntityReference er = ((SmallMolecule) pe).getEntityReference(); if (er != null) return er.getUri(); } return null; }
private static int getPhosphoSite(ModificationFeature mf) { SequenceLocation loc = mf.getFeatureLocation(); if (loc != null && loc instanceof SequenceSite) { return ((SequenceSite) loc).getSequencePosition(); } return -1; }
/** * 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"); }
public boolean canCheck(Object thing) { return (thing instanceof SimplePhysicalEntity) && (((SimplePhysicalEntity) thing).getEntityReference() != null); } }
/** * Gets the Short Name (or Display Name). * * @param bpe BioPAX element * @return short name field, or null if not available. */ private static String getShortName(BioPAXElement bpe) { String shortName = null; if(bpe instanceof Named) { shortName = ((Named)bpe).getDisplayName(); } return shortName; }
@Override public boolean match(BindingFeature a, BindingFeature b) { boolean ab = a.getBindsTo() != null && b.getBindsTo() != null && a.getBindsTo().isEquivalent(b.getBindsTo()); return !a.isEquivalent(b) && ab; } };
public boolean canCheck(Object thing) { return thing instanceof PathwayStep /* can be null, e.g., when the check is called * during a new PathwayStep is added to the model * but not yet assigned to any Pathway! * This is ignored. */ && ((PathwayStep)thing).getPathwayOrderOf() != null; }
@Override public String toString() { return this.left.getStandardName() + "--" + this.right.getDisplayName() + "(" + this.deltaFeatures + ")"; }
@Override public boolean match(SimplePhysicalEntity e1, SimplePhysicalEntity e2) { return e1.hasEquivalentFeatures(e2) && e1.hasEquivalentCellularLocation(e2); //TODO add 'standardName' for comparison? } };
private boolean isGeneric(SmallMoleculeReference smr) { if (!smr.getMemberEntityReference().isEmpty()) return true; for (SimplePhysicalEntity sm : smr.getEntityReferenceOf()) { if (!sm.getMemberPhysicalEntity().isEmpty()) return true; } return false; }
/** * Checks if the direction can be treated as reversible. * @param direction1 direction to check * @return true if direction is REVERSIBLE or null, false otherwise */ private boolean isReversible(ConversionDirectionType direction1) { return direction1 == null || direction1.equals(ConversionDirectionType.REVERSIBLE); }
public boolean canCheck(Object thing) { return thing instanceof BindingFeature && ((BindingFeature)thing).getBindsTo() != null; }
private void addAvailabilityAndProvenance(Entity bpEntity, Set<String> avail, Provenance pro) { if(pro != null) bpEntity.addDataSource(pro); if(avail != null) for(String a : avail) bpEntity.addAvailability(a); }
/** * Gets the name of the small molecule to use in SIF. * @param smr small molecule ref * @return a name */ protected String getCompoundName(SmallMoleculeReference smr) { return smr.getDisplayName(); } }
public boolean canCheck(Object thing) { return thing instanceof Pathway && ((Pathway)thing).getOrganism() != null; }
@Override public boolean canCheck(Object thing) { return thing instanceof SimplePhysicalEntity && ((SimplePhysicalEntity) thing).getEntityReference() != null; } }
private void fix(BiochemicalPathwayStep t, Object... values) { if(values[0] instanceof Catalysis) { ((Catalysis)values[0]).setCatalysisDirection((CatalysisDirectionType) values[1]); } else if (values[0] instanceof Conversion){ ((Conversion)values[0]).setConversionDirection((ConversionDirectionType) values[1]); } }
@Override public boolean match(BindingFeature a, BindingFeature b) { boolean ab = a.getBindsTo() != null && b.getBindsTo() != null && a.getBindsTo().isEquivalent(b.getBindsTo()); return !a.isEquivalent(b) && ab; } };
public boolean canCheck(Object thing) { return thing instanceof PathwayStep /* can be null, e.g., when the check is called * during a new PathwayStep is added to the model * but not yet assigned to any Pathway! * This is ignored. */ && ((PathwayStep)thing).getPathwayOrderOf() != null; }