|
||||||||||
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.
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 matches with the most used matches in the end. |
protected HashMap<String,Object> |
loadedMatchesMap
Map of the loaded matches. |
protected ArrayList<String> |
longKeys
Map of long keys which will be referenced by their index for file creation. |
protected int |
methodUsed
The method used. |
protected HashMap<String,Boolean> |
modifiedMatches
Map indicating whether a match is modified. |
protected ArrayList<String> |
peptideIdentification
List of the keys of all imported peptides. |
protected ArrayList<String> |
proteinIdentification
List of the keys of all imported proteins. |
protected HashMap<String,ArrayList<String>> |
proteinMap
a map linking protein accessions to all their protein matches keys. |
protected String |
serializationDirectory
the directory where matches will be serialized |
protected ArrayList<String> |
spectrumIdentification
List of the keys of all imported psms. |
protected HashMap<String,HashMap<String,UrParameter>> |
urParameters
Map of the user's parameters. |
Constructor Summary | |
---|---|
Identification()
|
Method Summary | |
---|---|
void |
addMatchParameter(String key,
UrParameter urParameter)
Adds a parameter with a corresponding match key which will be loaded in the memory. |
void |
addSpectrumMatch(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(JProgressBar progressBar)
Creates the peptides and protein instances based on the spectrum matches. |
void |
buildPeptidesAndProteins(String spectrumMatchKey)
Creates the peptides and protein instances based on the given spectrum match. |
void |
emptyCache(ProgressDialogX progressDialog,
boolean cancelProgress)
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. |
UrParameter |
getMatchParameter(String matchKey,
UrParameter urParameter)
Returns the personalization parameter of the given match. |
int |
getMethodUsed()
Getter for the identification method used. |
ArrayList<String> |
getPeptideIdentification()
Returns a list of the keys of all encountered peptides. |
PeptideMatch |
getPeptideMatch(String peptideKey)
Returns a peptide match. |
ArrayList<String> |
getProteinIdentification()
Returns a list of the keys of all encountered proteins. |
HashMap<String,ArrayList<String>> |
getProteinMap()
Returns a map of all the protein matches which can be ascribed to a protein indexed by its accession. |
ProteinMatch |
getProteinMatch(String proteinKey)
Returns a protein match. |
String |
getSerializationDirectory()
Returns the serialization directory. |
ArrayList<String> |
getSpectrumIdentification()
Returns a list of the keys of all encountered psms. |
SpectrumMatch |
getSpectrumMatch(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 |
matchExists(String matchKey)
Indicates whether a match indexed by the given key exists. |
boolean |
memoryCheck()
Indicates whether the memory used by the application is lower than 99% of the heap size. |
void |
reduceMemoryConsumtion(JProgressBar progressBar)
Reduces the amount of identification saved in memory by 20%. |
void |
removeMatch(String matchKey)
Removes a match from the model. |
void |
save(File newFolder,
ProgressDialogX progressDialog,
boolean cancelProgress)
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(IdentificationMatch match)
Indicates that a match was changed, it will thus be serialized again if needed. |
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 |
---|
public static final String EXTENTION
protected ArrayList<String> proteinIdentification
protected ArrayList<String> peptideIdentification
protected ArrayList<String> spectrumIdentification
protected HashMap<String,ArrayList<String>> proteinMap
protected int methodUsed
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
Constructor Detail |
---|
public Identification()
Method Detail |
---|
public void addMatchParameter(String key, UrParameter urParameter)
key
- the key of the parameterurParameter
- the additional parameterpublic UrParameter getMatchParameter(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 removeMatch(String matchKey) throws IllegalArgumentException
matchKey
- the key of the match to remove
IllegalArgumentException
public boolean matchExists(String matchKey)
matchKey
- the key of the match looked for
public SpectrumMatch getSpectrumMatch(String spectrumKey) throws IllegalArgumentException
spectrumKey
- the key of the match
IllegalArgumentException
- exception thrown whenever an error
occurred while retrieving the matchpublic PeptideMatch getPeptideMatch(String peptideKey) throws IllegalArgumentException
peptideKey
- the key of the match
IllegalArgumentException
- exception thrown whenever an error
occurred while retrieving the matchpublic ProteinMatch getProteinMatch(String proteinKey) throws IllegalArgumentException
proteinKey
- the key of the match
IllegalArgumentException
- exception thrown whenever an error
occurred while retrieving the matchpublic ArrayList<String> getProteinIdentification()
public ArrayList<String> getPeptideIdentification()
public ArrayList<String> getSpectrumIdentification()
public void addSpectrumMatch(SpectrumMatch newMatch) throws FileNotFoundException, IOException
newMatch
- the new spectrum match
FileNotFoundException
IOException
public void updateCache() throws FileNotFoundException, IOException
FileNotFoundException
- exception thrown whenever an error occurred
while serializing a match
IOException
- exception thrown whenever an error occurred while
serializing a matchpublic boolean memoryCheck()
public void reduceMemoryConsumtion(JProgressBar progressBar) throws FileNotFoundException, IOException
progressBar
- the progress bar
FileNotFoundException
- exception thrown whenever an error occurred
while serializing a match
IOException
- exception thrown whenever an error occurred while
serializing a matchpublic void buildPeptidesAndProteins(JProgressBar progressBar)
progressBar
- the progress barpublic void buildPeptidesAndProteins(String spectrumMatchKey)
spectrumMatchKey
- The key of the spectrum match to addpublic void emptyCache(ProgressDialogX progressDialog, boolean cancelProgress) throws FileNotFoundException, IOException
progressDialog
- cancelProgress
- set this to true to cancel the progress
FileNotFoundException
- exception thrown whenever an error occurred
while serializing a match
IOException
- exception thrown whenever an error occurred while
serializing a matchpublic void addSpectrumMatch(Set<SpectrumMatch> spectrumMatches) throws FileNotFoundException, IOException
spectrumMatches
- The spectrum matches
FileNotFoundException
- exception thrown when one tries to assign
more than one identification per advocate to the same spectrum
IOException
- exception thrown when one tries to assign more than
one identification per advocate to the same spectrumpublic int getMethodUsed()
public HashMap<String,ArrayList<String>> getProteinMap()
public void setMatchChanged(IdentificationMatch match) throws IllegalArgumentException
match
-
IllegalArgumentException
public void save(File newFolder, ProgressDialogX progressDialog, boolean cancelProgress) throws FileNotFoundException, IOException
newFolder
- the new folderprogressDialog
- a progress dialog to display the progress (can be
null)cancelProgress
- set to true to cancel the progress
FileNotFoundException
- Exception thrown whenever a problem
occurred during the serialization process
IOException
- 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 |