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:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ModificationParameters()
Constructor.ModificationParameters(ModificationParameters modificationParameters)
Constructor creating a new Modification profile based on the given one. -
Method Summary
Modifier and Type Method Description void
addFixedModification(Modification modification)
Adds a fixed modification.void
addRefinementFixedModification(Modification modification)
Adds a fixed refinement modification.void
addRefinementVariableModification(Modification modification)
Adds a variable refinement modification.void
addVariableModification(Modification modification)
Adds a variable modification.void
clearFixedModifications()
Clears fixed modifications.void
clearRefinementModifications()
Clears refinement modifications.void
clearVariableModifications()
Clears variable modifications.boolean
contains(String modificationName)
Indicates whether the modification is contained in the profile, looking into all modifications (fixed, variable and refinement)boolean
equals(ModificationParameters otherProfile)
Returns true of the two profiles are identical.ArrayList<String>
getAllModifications()
Returns a list of all searched modifications.ArrayList<String>
getAllNotFixedModifications()
Returns a list of all searched modifications but the fixed ones.HashMap<String,Modification>
getBackedUpModifications()
Returns the modifications backed-up as a map.int
getColor(String modification)
Returns the color used to code the given modification.HashMap<String,Integer>
getColors()
Returns the modification colors as a map.ArrayList<String>
getFixedModifications()
Returns the searched fixed modifications names.Modification
getModification(String modName)
Returns the back-ed up modification with the given name.ArrayList<String>
getRefinementFixedModifications()
Return the refinement fixed modifications used for the second pass search.ArrayList<String>
getRefinementVariableModifications()
Return the refinement variable modifications used for the second pass search.ArrayList<String>
getVariableModifications()
Returns the expected variable modification names included in this profile.void
removeFixedModification(String modificationName)
Removes a modification from the list of fixed modifications.void
removeRefinementFixedModification(String modificationName)
Removes a fixed modification from the list of refinement modifications.void
removeRefinementVariableModification(String modificationName)
Removes a variable modification from the list of refinement modifications.void
removeVariableModification(String modificationName)
Removes a modification from the list of variable modifications.void
setColor(String expectedModification, int color)
Sets a new color for the given expected modification.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Constructor Details
-
ModificationParameters
public ModificationParameters()Constructor. -
ModificationParameters
Constructor creating a new Modification profile based on the given one.- Parameters:
modificationParameters
- the modification profile
-
-
Method Details
-
getVariableModifications
Returns the expected variable modification names included in this profile.- Returns:
- the expected variable modification names included in this profile
-
getFixedModifications
Returns the searched fixed modifications names.- Returns:
- the searched fixed modifications names
-
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
Return the refinement fixed modifications used for the second pass search.- Returns:
- the refinement fixed modifications
-
getAllModifications
Returns a list of all searched modifications.- Returns:
- a list of all searched modifications
-
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
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
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
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
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
Sets a new color for the given expected modification.- Parameters:
expectedModification
- the name of the expected modificationcolor
- the new color
-
getColor
Returns the color used to code the given modification.- Parameters:
modification
- the name of the given expected modification- Returns:
- the corresponding color
-
getColors
Returns the modification colors as a map.- Returns:
- the modifications colors as a map
-
getModification
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
Returns the modifications backed-up as a map. modification name > modification.- Returns:
- the modifications backed-up as a map
-
removeVariableModification
Removes a modification from the list of variable modifications.- Parameters:
modificationName
- the name of the modification
-
removeFixedModification
Removes a modification from the list of fixed modifications.- Parameters:
modificationName
- the name of the modification
-
removeRefinementVariableModification
Removes a variable modification from the list of refinement modifications.- Parameters:
modificationName
- the name of the modification
-
removeRefinementFixedModification
Removes a fixed modification from the list of refinement modifications.- Parameters:
modificationName
- the name of the modification
-
contains
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
Returns true of the two profiles are identical.- Parameters:
otherProfile
- the profile to compare against- Returns:
- true of the two profiles are identical
-