Class ModificationParameters

java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.parameters.identification.search.ModificationParameters
All Implemented Interfaces:
Serializable

public class ModificationParameters extends ExperimentObject
This class stores the information about the modification parameters (usage, colors, names).
Author:
Marc Vaudel, Harald Barsnes
See Also:
  • Constructor Details

    • ModificationParameters

      public ModificationParameters()
      Constructor.
    • ModificationParameters

      public ModificationParameters(ModificationParameters modificationParameters)
      Constructor creating a new Modification profile based on the given one.
      Parameters:
      modificationParameters - the modification profile
  • Method Details

    • getVariableModifications

      public ArrayList<String> getVariableModifications()
      Returns the expected variable modification names included in this profile.
      Returns:
      the expected variable modification names included in this profile
    • getFixedModifications

      public ArrayList<String> getFixedModifications()
      Returns the searched fixed modifications names.
      Returns:
      the searched fixed modifications names
    • getRefinementVariableModifications

      public ArrayList<String> getRefinementVariableModifications()
      Return the refinement variable modifications used for the second pass search.
      Returns:
      the refinement variable modifications
    • clearVariableModifications

      public void clearVariableModifications()
      Clears variable modifications.
    • clearFixedModifications

      public void clearFixedModifications()
      Clears fixed modifications.
    • clearRefinementModifications

      public void clearRefinementModifications()
      Clears refinement modifications.
    • getRefinementFixedModifications

      public ArrayList<String> getRefinementFixedModifications()
      Return the refinement fixed modifications used for the second pass search.
      Returns:
      the refinement fixed modifications
    • getAllModifications

      public ArrayList<String> getAllModifications()
      Returns a list of all searched modifications.
      Returns:
      a list of all searched modifications
    • getAllNotFixedModifications

      public ArrayList<String> getAllNotFixedModifications()
      Returns a list of all searched modifications but the fixed ones. Note: to be fixed a modification must be fixed during the first and second pass searches.
      Returns:
      a list of all searched modifications but the fixed ones
    • addVariableModification

      public void addVariableModification(Modification modification)
      Adds a variable modification. The modification name is added in the variable modifications names list and the modification is saved in the back-up. In case a modification with the same name was already used it will be silently overwritten.
      Parameters:
      modification - the modification to add
    • addRefinementVariableModification

      public void addRefinementVariableModification(Modification modification)
      Adds a variable refinement modification. The modification name is added in the refinement modifications names list and the modification is saved in the back-up. In case a modification with the same name was already used it will be silently overwritten.
      Parameters:
      modification - the modification to add
    • addRefinementFixedModification

      public void addRefinementFixedModification(Modification modification)
      Adds a fixed refinement modification. The modification name is added in the refinement modifications names list and the modification is saved in the back-up. In case a modification with the same name was already used it will be silently overwritten.
      Parameters:
      modification - the modification to add
    • addFixedModification

      public void addFixedModification(Modification modification)
      Adds a fixed modification. The modification name is added in the fixed modifications names list and the modification is saved in the back-up. In case a modification with the same name was already used it will be silently overwritten.
      Parameters:
      modification - the modification to add
    • setColor

      public void setColor(String expectedModification, int color)
      Sets a new color for the given expected modification.
      Parameters:
      expectedModification - the name of the expected modification
      color - the new color
    • getColor

      public int getColor(String modification)
      Returns the color used to code the given modification.
      Parameters:
      modification - the name of the given expected modification
      Returns:
      the corresponding color
    • getColors

      public HashMap<String,Integer> getColors()
      Returns the modification colors as a map.
      Returns:
      the modifications colors as a map
    • getModification

      public Modification getModification(String modName)
      Returns the back-ed up modification with the given name.
      Parameters:
      modName - the name of the modification of interest
      Returns:
      the corresponding modification. Null if not found.
    • getBackedUpModifications

      public HashMap<String,Modification> getBackedUpModifications()
      Returns the modifications backed-up as a map. modification name > modification.
      Returns:
      the modifications backed-up as a map
    • removeVariableModification

      public void removeVariableModification(String modificationName)
      Removes a modification from the list of variable modifications.
      Parameters:
      modificationName - the name of the modification
    • removeFixedModification

      public void removeFixedModification(String modificationName)
      Removes a modification from the list of fixed modifications.
      Parameters:
      modificationName - the name of the modification
    • removeRefinementVariableModification

      public void removeRefinementVariableModification(String modificationName)
      Removes a variable modification from the list of refinement modifications.
      Parameters:
      modificationName - the name of the modification
    • removeRefinementFixedModification

      public void removeRefinementFixedModification(String modificationName)
      Removes a fixed modification from the list of refinement modifications.
      Parameters:
      modificationName - the name of the modification
    • contains

      public boolean contains(String modificationName)
      Indicates whether the modification is contained in the profile, looking into all modifications (fixed, variable and refinement)
      Parameters:
      modificationName - the name of the modification
      Returns:
      a boolean indicating whether the modification is contained in the mapping
    • equals

      public boolean equals(ModificationParameters otherProfile)
      Returns true of the two profiles are identical.
      Parameters:
      otherProfile - the profile to compare against
      Returns:
      true of the two profiles are identical