Package com.compomics.util.pride
Class PtmToPrideMap
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.pride.PtmToPrideMap
- All Implemented Interfaces:
Serializable
public class PtmToPrideMap extends ExperimentObject
Map linking user modification names to Unimod CV terms.
- Author:
- Marc Vaudel, Harald Barsnes
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PtmToPrideMap()
Constructor. -
Method Summary
Modifier and Type Method Description CvTerm
getCVTerm(String ptmName)
Returns the CV term corresponding to the given PTM name.static CvTerm
getDefaultCVTerm(String ptmName)
Deprecated.use the getCvTerm method for the PTM insteadstatic PtmToPrideMap
loadPtmToPrideMap(SearchParameters searchParameters)
Deprecated.the CV term is now part of the PTM objectvoid
putCVTerm(String modName, CvTerm cvTerm)
Puts a new mapping in the map.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Field Details
-
fileName
The name of the file to save.- See Also:
- Constant Field Values
-
-
Constructor Details
-
PtmToPrideMap
public PtmToPrideMap()Constructor.
-
-
Method Details
-
getCVTerm
Returns the CV term corresponding to the given PTM name. Null if not found.- Parameters:
ptmName
- the PTM name- Returns:
- the corresponding CV term
-
putCVTerm
Puts a new mapping in the map. If the modification name is already loaded it will be silently overwritten.- Parameters:
modName
- the modification namecvTerm
- the corresponding cvTerm
-
getDefaultCVTerm
Deprecated.use the getCvTerm method for the PTM insteadReturns the default cvTerm of a modification when it exists.- Parameters:
ptmName
- the PTM name according to the XML file, null if no mapping is found- Returns:
- a default CV term
-
loadPtmToPrideMap
public static PtmToPrideMap loadPtmToPrideMap(SearchParameters searchParameters) throws FileNotFoundException, IOException, ClassNotFoundExceptionDeprecated.the CV term is now part of the PTM objectLoads the PRIDE to PTM map from the user folder or creates a new one if the file is not present. Loads a default mapping if a PTM is not mapped.- Parameters:
searchParameters
- the search parameters- Returns:
- the PRIDE to PTM map
- Throws:
FileNotFoundException
- if a FileNotFoundException occursIOException
- if an IOException occursClassNotFoundException
- if a ClassNotFoundException occurs
-