|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.quantification.Quantification
public abstract class Quantification
This class contains quantification results. User: Marc Date: Nov 11, 2010 Time: 3:46:24 PM
Nested Class Summary | |
---|---|
static class |
Quantification.QuantificationMethod
The implemented quantification methods. |
Field Summary | |
---|---|
protected boolean |
automatedMemoryManagement
boolean indicating whether the memory management should be done automatically. |
protected int |
cacheSize
The cache size in number of matches. 20000 by default: should be enough to contain a velos file. |
static String |
EXTENTION
Extention for a serialized hit. cuh for Compomics Utilities Hit. |
protected boolean |
inMemory
boolean indicating whether the identification should be stored in memory or not. |
protected ArrayList<String> |
loadedMatches
List of the loaded quantification matches with the most used matches in the end |
protected HashMap<String,Object> |
loadedMatchesMap
Map of the loaded quantification matches |
protected ArrayList<String> |
longKeys
Map of long keys which will be referenced by their index for file creation |
protected Quantification.QuantificationMethod |
methodUsed
The quantification method used |
protected HashMap<String,Boolean> |
modifiedMatches
Map indicating whether a quantification match is modified. |
protected ArrayList<String> |
peptideQuantification
The peptide quantification |
protected ArrayList<String> |
proteinQuantification
The protein quantification |
protected HashMap<String,ArrayList<String>> |
psmIDentificationToQuantification
A convenience map indicating all psm quantifying an identified PSM |
protected String |
serializationDirectory
the directory where matches will be serialized |
protected HashMap<String,HashMap<String,UrParameter>> |
urParameters
Map of the user's parameters. |
Constructor Summary | |
---|---|
Quantification()
|
Method Summary | |
---|---|
void |
addPeptideQuantification(PeptideQuantification match)
Add a peptide quantification match to the peptide quantification matches map if not already implemented. |
void |
addProteinQuantification(ProteinQuantification match)
Add a protein quantification match to the peptide quantification matches map if not already implemented. |
void |
addPsmQuantification(PsmQuantification match)
Add a spectrum quantification to the spectrum quantification matches map and overwrites if already implemented. |
void |
addQuantificationParameter(String key,
UrParameter urParameter)
adds a parameter with a corresponding quantification key which will be loaded in the memory. |
void |
buildPeptidesAndProteinQuantifications(Identification identification)
Creates the peptides and protein quantification instances based on the identification and the psm quantification. |
void |
emptyCache(ProgressDialogX progressDialog)
Empties the cache and serializes everything in the specified serialization folder |
int |
getCacheSize()
Returns the cache size in number of matches |
String |
getFileName(String key)
Returns the name of the file to use for serialization/deserialization |
Quantification.QuantificationMethod |
getMethodUsed()
getter for the method used |
PeptideQuantification |
getPeptideMatch(String peptideKey)
Returns a peptide quantification match |
ArrayList<String> |
getPeptideQuantification()
This method retrieves the quantification result at the protein level |
ProteinQuantification |
getProteinMatch(String proteinKey)
Returns a protein quantification match |
ArrayList<String> |
getProteinQuantification()
This method retrieves the quantification result at the protein level |
HashMap<String,ArrayList<String>> |
getPsmIDentificationToQuantification()
This method retrieves the quantification result at the protein level |
UrParameter |
getQuantificationParameter(String matchKey,
UrParameter urParameter)
Returns the personalization parameter of the given quantification |
String |
getSerializationDirectory()
Returns the serialization directory |
PsmQuantification |
getSpectrumMatch(String spectrumKey)
Returns a spectrum quantification match |
ArrayList<PsmQuantification> |
getSpectrumMatches(String identificationMatchKey)
Returns a list of PSM quantification matches corresponding to the given psm identification key. |
boolean |
isAutomatedMemoryManagement()
Returns whether the memory management is automated. |
boolean |
isInMemory()
Indicates whether matches will be stored in memory |
boolean |
memoryCheck()
Indicates whether the memory used by the application is lower than 99% of the heap size |
void |
removeQuantification(String quantificationKey)
Removes a quantification from the model |
void |
save(File newFolder,
ProgressDialogX progressDialog)
Saves the identification matches in the desired folder |
void |
setAutomatedMemoryManagement(boolean automatedMemoryManagement)
Sets whether the memory management should be automated |
void |
setCacheSize(int cacheSize)
Sets the cache size |
void |
setInMemory(boolean inMemory)
Sets whether matches shall be stored in memory |
void |
setMatchChanged(QuantificationMatch match)
Indicates that a match was changed, it will thus be serialized again if needed. |
void |
setMethodUsed(Quantification.QuantificationMethod methodUsed)
setter for the method used |
void |
setSerializationDirectory(String serializationDirectory)
sets the serialization directory |
void |
updateCache()
updates the cache according to the memory settings. |
Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject |
---|
addUrParam, getParameterKey, getUrParam |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Quantification.QuantificationMethod methodUsed
public static final String EXTENTION
protected int cacheSize
protected String serializationDirectory
protected boolean inMemory
protected boolean automatedMemoryManagement
protected HashMap<String,Object> loadedMatchesMap
protected ArrayList<String> loadedMatches
protected HashMap<String,Boolean> modifiedMatches
protected HashMap<String,HashMap<String,UrParameter>> urParameters
protected ArrayList<String> longKeys
protected ArrayList<String> proteinQuantification
protected ArrayList<String> peptideQuantification
protected HashMap<String,ArrayList<String>> psmIDentificationToQuantification
Constructor Detail |
---|
public Quantification()
Method Detail |
---|
public ArrayList<String> getProteinQuantification()
public ArrayList<String> getPeptideQuantification()
public HashMap<String,ArrayList<String>> getPsmIDentificationToQuantification()
public Quantification.QuantificationMethod getMethodUsed()
public void setMethodUsed(Quantification.QuantificationMethod methodUsed)
methodUsed
- the method usedpublic void addQuantificationParameter(String key, UrParameter urParameter)
key
- the key of the parameterurParameter
- the additional parameterpublic UrParameter getQuantificationParameter(String matchKey, UrParameter urParameter)
matchKey
- the match keyurParameter
- example of parameter to retrieve
public boolean isAutomatedMemoryManagement()
public void setAutomatedMemoryManagement(boolean automatedMemoryManagement)
automatedMemoryManagement
- a boolean indicating whether the memory management should be automatedpublic int getCacheSize()
public void setCacheSize(int cacheSize)
cacheSize
- number of matches to allow in the cache sizepublic boolean isInMemory()
public void setInMemory(boolean inMemory)
inMemory
- a boolean indicating whether matches shall be stored in memorypublic String getSerializationDirectory()
public void setSerializationDirectory(String serializationDirectory)
serializationDirectory
- the path of the serialization directorypublic void removeQuantification(String quantificationKey)
quantificationKey
- the key of the match to removepublic ArrayList<PsmQuantification> getSpectrumMatches(String identificationMatchKey) throws Exception
identificationMatchKey
- the key of the identification match
Exception
- exception thrown whenever an error occurred while retrieving the matchpublic PsmQuantification getSpectrumMatch(String spectrumKey) throws Exception
spectrumKey
- the key of the spectrum match
Exception
- exception thrown whenever an error occurred while retrieving the matchpublic PeptideQuantification getPeptideMatch(String peptideKey) throws Exception
peptideKey
- the key of the match
Exception
- exception thrown whenever an error occurred while retrieving the matchpublic ProteinQuantification getProteinMatch(String proteinKey) throws Exception
proteinKey
- the key of the match
Exception
- exception thrown whenever an error occurred while retrieving the matchpublic void addPsmQuantification(PsmQuantification match) throws Exception
match
- the new spectrum match
Exception
public void addPeptideQuantification(PeptideQuantification match) throws Exception
match
- the new spectrum match
Exception
public void addProteinQuantification(ProteinQuantification match) throws Exception
match
- the new spectrum match
Exception
public void updateCache() throws Exception
Exception
- exception thrown whenever an error occurred while serializing a matchpublic boolean memoryCheck()
public void buildPeptidesAndProteinQuantifications(Identification identification) throws Exception
identification
-
Exception
public void emptyCache(ProgressDialogX progressDialog) throws Exception
progressDialog
-
Exception
- exception thrown whenever an error occurred while serializing a matchpublic void setMatchChanged(QuantificationMatch match) throws Exception
match
-
Exception
public void save(File newFolder, ProgressDialogX progressDialog) throws Exception
newFolder
- the new folderprogressDialog
- a progress dialog to display the progress (can be null)
Exception
- Exception thrown whenever a problem occurred during the serialization processpublic String getFileName(String key)
key
- the key of the match
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |