com.compomics.util.pride
Class PtmToPrideMap

java.lang.Object
  extended by com.compomics.util.pride.PtmToPrideMap
All Implemented Interfaces:
Serializable

public class PtmToPrideMap
extends Object
implements Serializable

Map linking user modification names to PSI-MOD CV terms.

Author:
Marc Vaudel, Harald Barsnes
See Also:
Serialized Form

Field Summary
static String fileName
          The name of the file to save.
 
Constructor Summary
PtmToPrideMap()
          Constructor.
 
Method Summary
 CvTerm getCVTerm(String ptmName)
          Returns the CV term corresponding to the given PTM name.
static CvTerm getDefaultCVTerm(String ptmName)
          Returns the default cvTerm of a modification when it exists.
static PtmToPrideMap loadPtmToPrideMap(SearchParameters searchParameters)
          Loads the PRIDE to PTM map from the user folder or creates a new one if the file is not present.
 void putCVTerm(String modName, CvTerm cvTerm)
          Puts a new mapping in the map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileName

public static final String fileName
The name of the file to save.

See Also:
Constant Field Values
Constructor Detail

PtmToPrideMap

public PtmToPrideMap()
Constructor.

Method Detail

getCVTerm

public CvTerm getCVTerm(String ptmName)
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

public void putCVTerm(String modName,
                      CvTerm cvTerm)
Puts a new mapping in the map. If the modification name is already loaded it will be silently overwritten.

Parameters:
modName - the modification name
cvTerm - the corresponding cvTerm

getDefaultCVTerm

public static CvTerm getDefaultCVTerm(String ptmName)
Returns the default cvTerm of a modification when it exists.

Parameters:
ptmName - the PTM Name according to the XML file
Returns:
a default CV term

loadPtmToPrideMap

public static PtmToPrideMap loadPtmToPrideMap(SearchParameters searchParameters)
                                       throws FileNotFoundException,
                                              IOException,
                                              ClassNotFoundException
Loads 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 present.

Returns:
the PRIDE to PTM map
Throws:
FileNotFoundException
IOException
ClassNotFoundException


Copyright © 2013. All Rights Reserved.