Enum ModificationLocalizationScore
java.lang.Object
java.lang.Enum<ModificationLocalizationScore>
com.compomics.util.experiment.identification.modification.ModificationLocalizationScore
- All Implemented Interfaces:
Serializable
,Comparable<ModificationLocalizationScore>
,java.lang.constant.Constable
public enum ModificationLocalizationScore extends Enum<ModificationLocalizationScore>
An enum of the modification localization scores.
- Author:
- Marc Vaudel
-
Nested Class Summary
-
Enum Constant Summary
-
Method Summary
Modifier and Type Method Description static String
getCommandLineOptions()
Returns the different implemented scores as list of command line option.int
getId()
Returns the id number of the score.String
getName()
Returns the name of the score.double
getRandomThreshold(int nModifications, int nSites)
Returns the threshold (inclusive) to use to consider an assignment random.static ModificationLocalizationScore
getScore(int id)
Returns the PTM score indexed by the given id.static ModificationLocalizationScore
getScore(String name)
Returns the PTM score of the given name.String
toString()
static ModificationLocalizationScore
valueOf(String name)
Returns the enum constant of this type with the specified name.static ModificationLocalizationScore[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
- Overrides:
toString
in classEnum<ModificationLocalizationScore>
-
getId
public int getId()Returns the id number of the score.- Returns:
- the id number of the score
-
getName
Returns the name of the score.- Returns:
- the name of the score
-
getScore
Returns the PTM score indexed by the given id.- Parameters:
id
- the id number of the PTM score- Returns:
- the desired PTM score
-
getScore
Returns the PTM score of the given name.- Parameters:
name
- the name of the score- Returns:
- the desired PTM score
-
getCommandLineOptions
Returns the different implemented scores as list of command line option.- Returns:
- the different implemented scores as list of command line option
-
getRandomThreshold
public double getRandomThreshold(int nModifications, int nSites)Returns the threshold (inclusive) to use to consider an assignment random. E.g. PhosphoRS with one modifications in two sites, a score of 50% is considered random. Returns Double.NaN if the number of modifications equals zero or the number of sites.- Parameters:
nModifications
- The number of modifications.nSites
- The number of sites.- Returns:
- the threshold to use to consider an assignment random
-