|
||||||||||
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.identification.Identification
public abstract class Identification
This class contains identification results. User: Marc Date: Nov 11, 2010 Time: 3:56:15 PM
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 java.lang.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 java.util.ArrayList<java.lang.String> |
loadedMatches
List of the loaded matches with the most used matches in the end |
protected java.util.HashMap<java.lang.String,java.lang.Object> |
loadedMatchesMap
Map of the loaded matches |
protected java.util.ArrayList<java.lang.String> |
longKeys
Map of long keys which will be referenced by their index for file creation |
protected int |
methodUsed
The method used. |
protected java.util.HashMap<java.lang.String,java.lang.Boolean> |
modifiedMatches
Map indicating whether a match is modified. |
protected java.util.ArrayList<java.lang.String> |
peptideIdentification
List of the keys of all imported peptides |
protected java.util.ArrayList<java.lang.String> |
proteinIdentification
List of the keys of all imported proteins |
protected java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> |
proteinMap
a map linking protein accessions to all their protein matches keys |
protected java.lang.String |
serializationDirectory
the directory where matches will be serialized |
protected java.util.ArrayList<java.lang.String> |
spectrumIdentification
List of the keys of all imported psms |
protected java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,UrParameter>> |
urParameters
Map of the user's parameters. |
Constructor Summary | |
---|---|
Identification()
|
Method Summary | |
---|---|
void |
addMatchParameter(java.lang.String key,
UrParameter urParameter)
adds a parameter with a corresponding match key which will be loaded in the memory. |
void |
addSpectrumMatch(java.util.Set<SpectrumMatch> spectrumMatches)
Add a set of spectrumMatches to the model |
void |
addSpectrumMatch(SpectrumMatch newMatch)
Add a spectrum match to the spectrum matches map. |
void |
buildPeptidesAndProteins()
Creates the peptides and protein instances based on the spectrum matches. |
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 |
java.lang.String |
getFileName(java.lang.String key)
Returns the name of the file to use for serialization/deserialization |
UrParameter |
getMatchParameter(java.lang.String matchKey,
UrParameter urParameter)
Returns the personalization parameter of the given match |
int |
getMethodUsed()
Getter for the identification method used |
java.util.ArrayList<java.lang.String> |
getPeptideIdentification()
Returns a list of the keys of all encountered peptides. |
PeptideMatch |
getPeptideMatch(java.lang.String peptideKey)
Returns a peptide match |
java.util.ArrayList<java.lang.String> |
getProteinIdentification()
Returns a list of the keys of all encountered proteins. |
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> |
getProteinMap()
Returns a map of all the protein matches which can be ascribed to a protein indexed by its accession. |
ProteinMatch |
getProteinMatch(java.lang.String proteinKey)
Returns a protein match |
java.lang.String |
getSerializationDirectory()
Returns the serialization directory |
java.util.ArrayList<java.lang.String> |
getSpectrumIdentification()
Returns a list of the keys of all encountered psms. |
SpectrumMatch |
getSpectrumMatch(java.lang.String spectrumKey)
Returns a spectrum match |
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 |
removeMatch(java.lang.String matchKey)
Removes a match from the model |
void |
save(java.io.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(Match match)
Indicates that a match was changed, it will thus be serialized again if needed. |
void |
setSerializationDirectory(java.lang.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 |
---|
public static final java.lang.String EXTENTION
protected java.util.ArrayList<java.lang.String> proteinIdentification
protected java.util.ArrayList<java.lang.String> peptideIdentification
protected java.util.ArrayList<java.lang.String> spectrumIdentification
protected java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> proteinMap
protected int methodUsed
protected int cacheSize
protected java.lang.String serializationDirectory
protected boolean inMemory
protected boolean automatedMemoryManagement
protected java.util.HashMap<java.lang.String,java.lang.Object> loadedMatchesMap
protected java.util.ArrayList<java.lang.String> loadedMatches
protected java.util.HashMap<java.lang.String,java.lang.Boolean> modifiedMatches
protected java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,UrParameter>> urParameters
protected java.util.ArrayList<java.lang.String> longKeys
Constructor Detail |
---|
public Identification()
Method Detail |
---|
public void addMatchParameter(java.lang.String key, UrParameter urParameter)
key
- the key of the parameterurParameter
- the additional parameterpublic UrParameter getMatchParameter(java.lang.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 java.lang.String getSerializationDirectory()
public void setSerializationDirectory(java.lang.String serializationDirectory)
serializationDirectory
- the path of the serialization directorypublic void removeMatch(java.lang.String matchKey)
matchKey
- the key of the match to removepublic SpectrumMatch getSpectrumMatch(java.lang.String spectrumKey) throws java.lang.Exception
spectrumKey
- the key of the match
java.lang.Exception
- exception thrown whenever an error occurred while retrieving the matchpublic PeptideMatch getPeptideMatch(java.lang.String peptideKey) throws java.lang.Exception
peptideKey
- the key of the match
java.lang.Exception
- exception thrown whenever an error occurred while retrieving the matchpublic ProteinMatch getProteinMatch(java.lang.String proteinKey) throws java.lang.Exception
proteinKey
- the key of the match
java.lang.Exception
- exception thrown whenever an error occurred while retrieving the matchpublic java.util.ArrayList<java.lang.String> getProteinIdentification()
public java.util.ArrayList<java.lang.String> getPeptideIdentification()
public java.util.ArrayList<java.lang.String> getSpectrumIdentification()
public void addSpectrumMatch(SpectrumMatch newMatch) throws java.lang.Exception
newMatch
- the new spectrum match
java.lang.Exception
public void updateCache() throws java.lang.Exception
java.lang.Exception
- exception thrown whenever an error occurred while serializing a matchpublic boolean memoryCheck()
public void buildPeptidesAndProteins() throws java.lang.Exception
java.lang.Exception
public void emptyCache(ProgressDialogX progressDialog) throws java.lang.Exception
progressDialog
-
java.lang.Exception
- exception thrown whenever an error occurred while serializing a matchpublic void addSpectrumMatch(java.util.Set<SpectrumMatch> spectrumMatches) throws java.lang.Exception
spectrumMatches
- The spectrum matches
java.lang.Exception
- exception thrown when one tries to assign more than one identification per advocate to the same spectrumpublic int getMethodUsed()
public java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> getProteinMap()
public void setMatchChanged(Match match) throws java.lang.Exception
match
-
java.lang.Exception
public void save(java.io.File newFolder, ProgressDialogX progressDialog) throws java.lang.Exception
newFolder
- the new folderprogressDialog
- a progress dialog to display the progress (can be null)
java.lang.Exception
- Exception thrown whenever a problem occurred during the serialization processpublic java.lang.String getFileName(java.lang.String key)
key
- the key of the match
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |