Class ActivityModificationChangeConstraint

java.lang.Object
org.biopax.paxtools.pattern.constraint.ConstraintAdapter
org.biopax.paxtools.pattern.constraint.ActivityModificationChangeConstraint
All Implemented Interfaces:
Constraint

public class ActivityModificationChangeConstraint extends ConstraintAdapter
This is a very specialized constraint that checks if two PhysicalEntity of the same EntityReference have differential features, such that we can predict an activity change based on gain or loss of these features. To use this constraint, user should be able to supply maps that categorize features as activating or inhibiting.
Author:
Ozgun Babur
  • Field Details

    • general

      protected static final String[] general
      Some general modification sub-strings to use if exact terms are not conclusive.
  • Constructor Details

    • ActivityModificationChangeConstraint

      public ActivityModificationChangeConstraint(boolean activating, Map<EntityReference,Set<ModificationFeature>> activityFeat, Map<EntityReference,Set<ModificationFeature>> inactivityFeat)
      Constructor with the desired change and maps to activating and inactivating features,
      Parameters:
      activating - desired change
      activityFeat - map from EntityReference to the activating features
      inactivityFeat - map from EntityReference to the inactivating features
  • Method Details

    • satisfies

      public boolean satisfies(Match match, int... ind)
      Checks the gained and and lost features to predict the activity change is the desired change. If exact matching (terms with locations) is not conclusive, then terms without locations are checked. If still not conclusive, then approximate matching is used.
      Specified by:
      satisfies in interface Constraint
      Overrides:
      satisfies in class ConstraintAdapter
      Parameters:
      match - current pattern match
      ind - mapped indices
      Returns:
      true if the modification gain or loss is mapped to the desired change
    • extractModifNames

      protected Map<EntityReference,Set<String>> extractModifNames(Map mfMap)
      Extracts the modification terms from the moficiation features.
      Parameters:
      mfMap - map for the features
      Returns:
      map from EntityReference to the set of the extracted terms
    • extractModifNames

      protected Set<String> extractModifNames(Set mfSet)
      Extracts terms of the modification features.
      Parameters:
      mfSet - set of modification features
      Returns:
      set of extracted terms
    • setContainsGeneralTerm

      protected boolean setContainsGeneralTerm(Set<String> set, String term)
      Checks if any element in the set contains the term.
      Parameters:
      set - set to check
      term - term to search for
      Returns:
      true if any element contains the term