|
||||||||||
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 | |
---|---|
static String |
EXTENTION
Deprecated. use the database methods instead |
protected ArrayList<String> |
longKeys
Deprecated. use the database instead |
protected int |
methodUsed
The method used. |
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 |
reference
The reference of the identification. |
protected String |
serializationDirectory
The directory where matches will be serialized/the database stored. |
protected ArrayList<String> |
spectrumIdentification
Deprecated. use file specific mapping instead |
protected HashMap<String,ArrayList<String>> |
spectrumIdentificationMap
List of all imported PSMs indexed by mgf file name. |
protected HashMap<String,HashMap<String,UrParameter>> |
urParameters
Deprecated. use the database instead |
Constructor Summary | |
---|---|
Identification()
|
Method Summary | |
---|---|
void |
addMatchParameter(String key,
UrParameter urParameter)
Deprecated. use the database match specific methods instead |
void |
addPeptideMatchParameter(String key,
UrParameter urParameter)
Adds a peptide match parameter to the database. |
void |
addProteinMatchParameter(String key,
UrParameter urParameter)
Adds a protein match parameter to the database. |
void |
addSpectrumMatch(Set<SpectrumMatch> spectrumMatches)
Add a set of spectrumMatches to the model. |
void |
addSpectrumMatch(SpectrumMatch newMatch)
Adds a spectrum match to the identification. |
void |
addSpectrumMatchParameter(String key,
UrParameter urParameter)
Adds a spectrum match parameter to the database. |
void |
buildPeptidesAndProteins(String spectrumMatchKey)
Creates the peptides and protein instances based on the given spectrum match. |
void |
buildPeptidesAndProteins(WaitingHandler waitingHandler)
Creates the peptides and protein instances based on the spectrum matches. |
void |
close()
Closes the database connection. |
void |
convert(WaitingHandler waitingHandler,
String newDirectory,
String newName,
ObjectsCache objectsCache,
File directory)
Converts a serialization based structure into a database based one. |
void |
establishConnection(String dbFolder,
boolean deleteOldDatabase,
ObjectsCache objectsCache)
Establishes a connection to the database. |
static String |
getDefaultReference(String experimentReference,
String sampleReference,
int replicateNumber)
Returns the default reference for an identification |
String |
getFileName(String key)
Deprecated. use the database methods instead |
UrParameter |
getMatchParameter(String matchKey,
UrParameter urParameter)
Deprecated. use the database match specific methods instead |
IdentificationMatch.MatchType |
getMatchType(String matchKey)
Returns the kind of match pointed by the given key in the identification mappings. |
int |
getMethodUsed()
Getter for the identification method used. |
ArrayList<String> |
getOrderedSpectrumFileNames()
Returns the ordered list of spectrum file names. |
ArrayList<String> |
getPeptideIdentification()
Returns a list of the keys of all encountered peptides. |
PeptideMatch |
getPeptideMatch(String peptideKey)
Returns a peptide match. |
PeptideMatch |
getPeptideMatch(String peptideKey,
boolean useDB)
Returns a peptide match. |
UrParameter |
getPeptideMatchParameter(String key,
UrParameter urParameter)
Returns the desired peptide match parameter. |
UrParameter |
getPeptideMatchParameter(String key,
UrParameter urParameter,
boolean useDB)
Returns the desired peptide match parameter. |
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. |
ProteinMatch |
getProteinMatch(String proteinKey,
boolean useDB)
Returns a protein match. |
UrParameter |
getProteinMatchParameter(String key,
UrParameter urParameter)
Returns the desired protein match parameter. |
UrParameter |
getProteinMatchParameter(String key,
UrParameter urParameter,
boolean useDB)
Returns the desired protein match parameter. |
String |
getSerializationDirectory()
Returns the serialization directory. |
ArrayList<String> |
getSpectrumFiles()
Returns the names of the mgf files used in the spectrum identification map as a list. |
ArrayList<String> |
getSpectrumIdentification()
Deprecated. use file specific names instead |
ArrayList<String> |
getSpectrumIdentification(String spectrumFile)
Returns the spectrum identifications for a given spectrum file name. |
HashMap<String,ArrayList<String>> |
getSpectrumIdentificationMap()
Returns the keys of all identified spectra indexed by the spectrum file. |
int |
getSpectrumIdentificationSize()
Returns the number of spectrum identifications. |
SpectrumMatch |
getSpectrumMatch(String spectrumKey)
Returns a spectrum match. |
SpectrumMatch |
getSpectrumMatch(String spectrumKey,
boolean useDB)
Returns a spectrum match. |
UrParameter |
getSpectrumMatchParameter(String key,
UrParameter urParameter)
Returns the desired spectrum match parameter. |
UrParameter |
getSpectrumMatchParameter(String key,
UrParameter urParameter,
boolean useDB)
Returns the desired spectrum match parameter. |
Boolean |
isDB()
Indicates whether the identification matches should be stored in a database (true, default value) or serialized files (false, deprecated default). |
void |
loadPeptideMatches(ArrayList<String> peptideKeys,
WaitingHandler waitingHandler)
Loads the desired peptide matches of the given type in the cache of the database. |
void |
loadPeptideMatches(WaitingHandler waitingHandler)
Loads all peptide matches in the cache of the database. |
void |
loadPeptideMatchParameters(ArrayList<String> peptideKeys,
UrParameter urParameter,
WaitingHandler waitingHandler)
Loads the desired peptide match parameters of the given type in the cache of the database. |
void |
loadPeptideMatchParameters(UrParameter urParameter,
WaitingHandler waitingHandler)
Loads all peptide match parameters of the given type in the cache of the database. |
void |
loadProteinMatches(ArrayList<String> proteinKeys,
WaitingHandler waitingHandler)
Loads the desired protein matches of the given type in the cache of the database. |
void |
loadProteinMatches(WaitingHandler waitingHandler)
Loads all protein matches in the cache of the database. |
void |
loadProteinMatchParameters(ArrayList<String> proteinKeys,
UrParameter urParameter,
WaitingHandler waitingHandler)
Loads the desired protein match parameters of the given type in the cache of the database. |
void |
loadProteinMatchParameters(UrParameter urParameter,
WaitingHandler waitingHandler)
Loads all protein match parameters of the given type in the cache of the database. |
void |
loadSpectrumMatches(ArrayList<String> spectrumKeys,
WaitingHandler waitingHandler)
Loads the given spectrum matches in the cache of the database. |
void |
loadSpectrumMatches(String fileName,
WaitingHandler waitingHandler)
Loads all spectrum matches of the file in the cache of the database |
void |
loadSpectrumMatchParameters(ArrayList<String> spectrumKeys,
UrParameter urParameter,
WaitingHandler waitingHandler)
Loads all desired spectrum match parameters in the cache of the database. |
void |
loadSpectrumMatchParameters(String fileName,
UrParameter urParameter,
WaitingHandler waitingHandler)
Loads all spectrum match parameters of the given type in the cache of the database |
boolean |
matchExists(String matchKey)
Indicates whether a match indexed by the given key exists. |
boolean |
peptideDetailsInCache(String peptideKey)
Indicates whether the peptide and spectrum matches corresponding to a peptide match key are loaded in the cache. |
boolean |
proteinDetailsInCache(String proteinKey)
Indicates whether the protein, peptide and spectrum matches corresponding to a protein match key are loaded in the cache. |
void |
removeMatch(String matchKey)
Deprecated. it is advised to use the specific psm/peptide/protein method instead |
void |
removePeptideMatch(String matchKey)
Removes a peptide match from the model. |
void |
removeProteinMatch(String matchKey)
Removes a protein match from the model. |
void |
removeSpectrumMatch(String matchKey)
Removes a spectrum match from the model. |
void |
setDirectory(String serializationDirectory,
boolean deleteOldDatabase)
Deprecated. use establishConnection(String dbFolder) instead |
void |
setIsDB(Boolean isDB)
Sets whether the identification matches should be stored in a database or serialized files. |
void |
setOrderedListOfSpectrumFileNames(ArrayList<String> orderedSpectrumFileNames)
Set the ordered list of spectrum file names. |
void |
updatePeptideMatch(PeptideMatch peptideMatch)
Updates a peptide match in the database. |
void |
updatePeptideMatchParameter(String key,
UrParameter urParameter)
Updates a peptide match parameter in the database. |
void |
updateProteinMatch(ProteinMatch proteinMatch)
Updates a protein match in the database. |
void |
updateProteinMatchParameter(String key,
UrParameter urParameter)
Updates a protein match parameter in the database. |
void |
updateSpectrumMapping()
Converts the old spectrum keys structure into the mapped version. |
void |
updateSpectrumMatch(SpectrumMatch spectrumMatch)
Updates a spectrum match in the database. |
void |
updateSpectrumMatchParameter(String key,
UrParameter urParameter)
Updates a spectrum match parameter in the database. |
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 HashMap<String,ArrayList<String>> spectrumIdentificationMap
protected ArrayList<String> spectrumIdentification
protected HashMap<String,ArrayList<String>> proteinMap
protected int methodUsed
protected String serializationDirectory
protected HashMap<String,HashMap<String,UrParameter>> urParameters
protected ArrayList<String> longKeys
protected String reference
Constructor Detail |
---|
public Identification()
Method Detail |
---|
public ArrayList<String> getOrderedSpectrumFileNames()
public void setOrderedListOfSpectrumFileNames(ArrayList<String> orderedSpectrumFileNames) throws IllegalArgumentException
orderedSpectrumFileNames
- the ordered list of spectrum file names
IllegalArgumentException
- thrown if the length of the ordered file
names as to be the same as the number of spectrum filespublic ArrayList<String> getSpectrumFiles()
public int getSpectrumIdentificationSize()
public void addMatchParameter(String key, UrParameter urParameter) throws SQLException, IOException
key
- the key of the parameterurParameter
- the additional parameter
SQLException
- exception thrown whenever an error occurred while
adding the object in the database
IOException
- exception thrown whenever an error occurred while
writing the objectpublic UrParameter getMatchParameter(String matchKey, UrParameter urParameter) throws SQLException, IOException, ClassNotFoundException
matchKey
- the match keyurParameter
- example of parameter to retrieve
SQLException
- exception thrown whenever an error occurred while
loading the object from the database
IOException
- exception thrown whenever an error occurred while
reading the object in the database
ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic void loadSpectrumMatchParameters(String fileName, UrParameter urParameter, WaitingHandler waitingHandler) throws SQLException, IOException, ClassNotFoundException, InterruptedException
fileName
- the file nameurParameter
- the parameter typewaitingHandler
- the waiting handler
SQLException
- exception thrown whenever an error occurred while
interrogating the database
IOException
- exception thrown whenever an error occurred while
reading the database
ClassNotFoundException
- exception thrown whenever the class of the
object is not found when deserializing it.
InterruptedException
public void loadSpectrumMatchParameters(ArrayList<String> spectrumKeys, UrParameter urParameter, WaitingHandler waitingHandler) throws SQLException, IOException, ClassNotFoundException, InterruptedException
spectrumKeys
- the key of the spectrum match of the parameters to be
loadedurParameter
- the parameter typewaitingHandler
- the waiting handler
SQLException
- exception thrown whenever an error occurred while
interrogating the database
IOException
- exception thrown whenever an error occurred while
reading the database
ClassNotFoundException
- exception thrown whenever the class of the
object is not found when deserializing it.
InterruptedException
public void loadPeptideMatchParameters(UrParameter urParameter, WaitingHandler waitingHandler) throws SQLException, IOException, ClassNotFoundException, InterruptedException
urParameter
- the parameter typewaitingHandler
- the waiting handler
SQLException
- exception thrown whenever an error occurred while
interrogating the database
IOException
- exception thrown whenever an error occurred while
reading the database
ClassNotFoundException
- exception thrown whenever the class of the
object is not found when deserializing it.
InterruptedException
public void loadPeptideMatchParameters(ArrayList<String> peptideKeys, UrParameter urParameter, WaitingHandler waitingHandler) throws SQLException, IOException, ClassNotFoundException, InterruptedException
peptideKeys
- the list of peptide keys of the parameters to loadurParameter
- the parameter typewaitingHandler
- the waiting handler
SQLException
- exception thrown whenever an error occurred while
interrogating the database
IOException
- exception thrown whenever an error occurred while
reading the database
ClassNotFoundException
- exception thrown whenever the class of the
object is not found when deserializing it.
InterruptedException
public void loadPeptideMatches(ArrayList<String> peptideKeys, WaitingHandler waitingHandler) throws SQLException, IOException, ClassNotFoundException, InterruptedException
peptideKeys
- the list of peptide keys to loadwaitingHandler
- the waiting handler
SQLException
- exception thrown whenever an error occurred while
interrogating the database
IOException
- exception thrown whenever an error occurred while
reading the database
ClassNotFoundException
- exception thrown whenever the class of the
object is not found when deserializing it.
InterruptedException
public void loadProteinMatchParameters(UrParameter urParameter, WaitingHandler waitingHandler) throws SQLException, IOException, ClassNotFoundException, InterruptedException
urParameter
- the parameter typewaitingHandler
- the waiting handler
SQLException
- exception thrown whenever an error occurred while
interrogating the database
IOException
- exception thrown whenever an error occurred while
reading the database
ClassNotFoundException
- exception thrown whenever the class of the
object is not found when deserializing it.
InterruptedException
public void loadProteinMatchParameters(ArrayList<String> proteinKeys, UrParameter urParameter, WaitingHandler waitingHandler) throws SQLException, IOException, ClassNotFoundException, InterruptedException
proteinKeys
- the list of protein keys of the parameters to loadurParameter
- the parameter typewaitingHandler
- the waiting handler
SQLException
- exception thrown whenever an error occurred while
interrogating the database
IOException
- exception thrown whenever an error occurred while
reading the database
ClassNotFoundException
- exception thrown whenever the class of the
object is not found when deserializing it.
InterruptedException
public void loadProteinMatches(WaitingHandler waitingHandler) throws SQLException, IOException, ClassNotFoundException, InterruptedException
waitingHandler
- the waiting handler
SQLException
- exception thrown whenever an error occurred while
interrogating the database
IOException
- exception thrown whenever an error occurred while
reading the database
ClassNotFoundException
- exception thrown whenever the class of the
object is not found when deserializing it.
InterruptedException
public void loadProteinMatches(ArrayList<String> proteinKeys, WaitingHandler waitingHandler) throws SQLException, IOException, ClassNotFoundException, InterruptedException
proteinKeys
- the list of protein keys to loadwaitingHandler
- the waiting handler
SQLException
- exception thrown whenever an error occurred while
interrogating the database
IOException
- exception thrown whenever an error occurred while
reading the database
ClassNotFoundException
- exception thrown whenever the class of the
object is not found when deserializing it.
InterruptedException
public void loadPeptideMatches(WaitingHandler waitingHandler) throws SQLException, IOException, ClassNotFoundException, InterruptedException
waitingHandler
- the waiting handler
SQLException
- exception thrown whenever an error occurred while
interrogating the database
IOException
- exception thrown whenever an error occurred while
reading the database
ClassNotFoundException
- exception thrown whenever the class of the
object is not found when deserializing it.
InterruptedException
public void loadSpectrumMatches(String fileName, WaitingHandler waitingHandler) throws SQLException, IOException, ClassNotFoundException, InterruptedException
fileName
- the file namewaitingHandler
- the waiting handler
SQLException
- exception thrown whenever an error occurred while
interrogating the database
IOException
- exception thrown whenever an error occurred while
reading the database
ClassNotFoundException
- exception thrown whenever the class of the
object is not found when deserializing it.
InterruptedException
public void loadSpectrumMatches(ArrayList<String> spectrumKeys, WaitingHandler waitingHandler) throws SQLException, IOException, ClassNotFoundException, InterruptedException
spectrumKeys
- the spectrum keyswaitingHandler
- the waiting handler
SQLException
- exception thrown whenever an error occurred while
interrogating the database
IOException
- exception thrown whenever an error occurred while
reading the database
ClassNotFoundException
- exception thrown whenever the class of the
object is not found when deserializing it.
InterruptedException
public UrParameter getSpectrumMatchParameter(String key, UrParameter urParameter) throws SQLException, IOException, ClassNotFoundException
key
- the PSM keyurParameter
- the match parameter
SQLException
- exception thrown whenever an error occurred while
loading the object from the database
IOException
- exception thrown whenever an error occurred while
reading the object in the database
ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic UrParameter getSpectrumMatchParameter(String key, UrParameter urParameter, boolean useDB) throws SQLException, IOException, ClassNotFoundException
key
- the PSM keyurParameter
- the match parameteruseDB
- if useDB is false, null will be returned if the object is
not in the cache
SQLException
- exception thrown whenever an error occurred while
loading the object from the database
IOException
- exception thrown whenever an error occurred while
reading the object in the database
ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic void addSpectrumMatchParameter(String key, UrParameter urParameter) throws SQLException, IOException
key
- the psm keyurParameter
- the match parameter
SQLException
- exception thrown whenever an error occurred while
adding the object in the database
IOException
- exception thrown whenever an error occurred while
writing the objectpublic UrParameter getPeptideMatchParameter(String key, UrParameter urParameter) throws SQLException, IOException, ClassNotFoundException
key
- the peptide keyurParameter
- the match parameter
SQLException
- exception thrown whenever an error occurred while
loading the object from the database
IOException
- exception thrown whenever an error occurred while
reading the object in the database
ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic UrParameter getPeptideMatchParameter(String key, UrParameter urParameter, boolean useDB) throws SQLException, IOException, ClassNotFoundException
key
- the peptide keyurParameter
- the match parameteruseDB
- if useDB is false, null will be returned if the object is
not in the cache
SQLException
- exception thrown whenever an error occurred while
loading the object from the database
IOException
- exception thrown whenever an error occurred while
reading the object in the database
ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic void addPeptideMatchParameter(String key, UrParameter urParameter) throws SQLException, IOException
key
- the peptide keyurParameter
- the match parameter
SQLException
- exception thrown whenever an error occurred while
adding the object in the database
IOException
- exception thrown whenever an error occurred while
writing the objectpublic UrParameter getProteinMatchParameter(String key, UrParameter urParameter) throws SQLException, IOException, ClassNotFoundException
key
- the protein keyurParameter
- the match parameter
SQLException
- exception thrown whenever an error occurred while
loading the object from the database
IOException
- exception thrown whenever an error occurred while
reading the object in the database
ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic UrParameter getProteinMatchParameter(String key, UrParameter urParameter, boolean useDB) throws SQLException, IOException, ClassNotFoundException
key
- the protein keyurParameter
- the match parameteruseDB
- if useDB is false, null will be returned if the object is
not in the cache
SQLException
- exception thrown whenever an error occurred while
loading the object from the database
IOException
- exception thrown whenever an error occurred while
reading the object in the database
ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic void addProteinMatchParameter(String key, UrParameter urParameter) throws SQLException, IOException
key
- the protein keyurParameter
- the match parameter
SQLException
- exception thrown whenever an error occurred while
adding the object in the database
IOException
- exception thrown whenever an error occurred while
writing the objectpublic void updateProteinMatchParameter(String key, UrParameter urParameter) throws SQLException, IOException
key
- the protein keyurParameter
- the match parameter
SQLException
- exception thrown whenever an error occurred while
adding the object in the database
IOException
- exception thrown whenever an error occurred while
writing the objectpublic void updatePeptideMatchParameter(String key, UrParameter urParameter) throws SQLException, IOException
key
- the peptide keyurParameter
- the match parameter
SQLException
- exception thrown whenever an error occurred while
adding the object in the database
IOException
- exception thrown whenever an error occurred while
writing the objectpublic void updateSpectrumMatchParameter(String key, UrParameter urParameter) throws SQLException, IOException
key
- the spectrum keyurParameter
- the match parameter
SQLException
- exception thrown whenever an error occurred while
adding the object in the database
IOException
- exception thrown whenever an error occurred while
writing the objectpublic void updateSpectrumMatch(SpectrumMatch spectrumMatch) throws SQLException, IOException
spectrumMatch
- the match
SQLException
- exception thrown whenever an error occurred while
adding the object in the database
IOException
- exception thrown whenever an error occurred while
writing the objectpublic void updatePeptideMatch(PeptideMatch peptideMatch) throws SQLException, IOException
peptideMatch
- the match
SQLException
- exception thrown whenever an error occurred while
adding the object in the database
IOException
- exception thrown whenever an error occurred while
writing the objectpublic void updateProteinMatch(ProteinMatch proteinMatch) throws SQLException, IOException
proteinMatch
- the match
SQLException
- exception thrown whenever an error occurred while
adding the object in the database
IOException
- exception thrown whenever an error occurred while
writing the objectpublic String getSerializationDirectory()
public void setDirectory(String serializationDirectory, boolean deleteOldDatabase) throws SQLException
serializationDirectory
- the path of the directorydeleteOldDatabase
- if true, tries to delete the old database
SQLException
public void removeMatch(String matchKey) throws IllegalArgumentException, SQLException, IOException
matchKey
- the key of the match to remove
IllegalArgumentException
SQLException
- exception thrown whenever an error occurred while
deleting the match
IOException
public void removeSpectrumMatch(String matchKey) throws IllegalArgumentException, SQLException, IOException
matchKey
- the key of the match to remove
IllegalArgumentException
SQLException
- exception thrown whenever an error occurred while
deleting the match
IOException
public void removePeptideMatch(String matchKey) throws IllegalArgumentException, SQLException, IOException
matchKey
- the key of the match to remove
IllegalArgumentException
SQLException
- exception thrown whenever an error occurred while
deleting the match
IOException
public void removeProteinMatch(String matchKey) throws IllegalArgumentException, SQLException, IOException
matchKey
- the key of the match to remove
IllegalArgumentException
SQLException
- exception thrown whenever an error occurred while
deleting the match
IOException
public boolean matchExists(String matchKey)
matchKey
- the key of the match looked for
public SpectrumMatch getSpectrumMatch(String spectrumKey) throws IllegalArgumentException, SQLException, IOException, ClassNotFoundException
spectrumKey
- the key of the match
IllegalArgumentException
- exception thrown whenever an error
occurred while retrieving the match
SQLException
- exception thrown whenever an error occurred while
loading the object from the database
IOException
- exception thrown whenever an error occurred while
reading the object in the database
ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic SpectrumMatch getSpectrumMatch(String spectrumKey, boolean useDB) throws IllegalArgumentException, SQLException, IOException, ClassNotFoundException
spectrumKey
- the key of the matchuseDB
- if useDB is false, null will be returned if the object is
not in the cache
IllegalArgumentException
- exception thrown whenever an error
occurred while retrieving the match
SQLException
- exception thrown whenever an error occurred while
loading the object from the database
IOException
- exception thrown whenever an error occurred while
reading the object in the database
ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic PeptideMatch getPeptideMatch(String peptideKey) throws IllegalArgumentException, SQLException, IOException, ClassNotFoundException
peptideKey
- the key of the match
IllegalArgumentException
- exception thrown whenever an error
occurred while retrieving the match
SQLException
- exception thrown whenever an error occurred while
loading the object from the database
IOException
- exception thrown whenever an error occurred while
reading the object in the database
ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic PeptideMatch getPeptideMatch(String peptideKey, boolean useDB) throws IllegalArgumentException, SQLException, IOException, ClassNotFoundException
peptideKey
- the key of the matchuseDB
- if useDB is false, null will be returned if the object is
not in the cache
IllegalArgumentException
- exception thrown whenever an error
occurred while retrieving the match
SQLException
- exception thrown whenever an error occurred while
loading the object from the database
IOException
- exception thrown whenever an error occurred while
reading the object in the database
ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic ProteinMatch getProteinMatch(String proteinKey) throws IllegalArgumentException, SQLException, IOException, ClassNotFoundException
proteinKey
- the key of the match
IllegalArgumentException
- exception thrown whenever an error
occurred while retrieving the match
SQLException
- exception thrown whenever an error occurred while
loading the object from the database
IOException
- exception thrown whenever an error occurred while
reading the object in the database
ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic ProteinMatch getProteinMatch(String proteinKey, boolean useDB) throws IllegalArgumentException, SQLException, IOException, ClassNotFoundException
proteinKey
- the key of the matchuseDB
- if useDB is false, null will be returned if the object is
not in the cache
IllegalArgumentException
- exception thrown whenever an error
occurred while retrieving the match
SQLException
- exception thrown whenever an error occurred while
loading the object from the database
IOException
- exception thrown whenever an error occurred while
reading the object in the database
ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic boolean proteinDetailsInCache(String proteinKey) throws IllegalArgumentException, SQLException, IOException, ClassNotFoundException
proteinKey
- the key of the protein match
IllegalArgumentException
SQLException
IOException
ClassNotFoundException
public boolean peptideDetailsInCache(String peptideKey) throws IllegalArgumentException, SQLException, IOException, ClassNotFoundException
peptideKey
- the peptide key
IllegalArgumentException
SQLException
IOException
ClassNotFoundException
public ArrayList<String> getProteinIdentification()
public ArrayList<String> getPeptideIdentification()
public ArrayList<String> getSpectrumIdentification()
public ArrayList<String> getSpectrumIdentification(String spectrumFile)
spectrumFile
- the name of the spectrum file
public HashMap<String,ArrayList<String>> getSpectrumIdentificationMap()
public void addSpectrumMatch(SpectrumMatch newMatch) throws FileNotFoundException, IOException, IllegalArgumentException, SQLException, ClassNotFoundException
newMatch
- the new match
FileNotFoundException
- exception thrown whenever an error occurred
while saving the file
IOException
- exception thrown whenever an error occurred while
saving the file
IllegalArgumentException
- exception thrown whenever an error
occurred while saving the file
SQLException
- exception thrown whenever an error occurred while
saving the file
ClassNotFoundException
- exception thrown whenever an error
occurred while saving the filepublic void buildPeptidesAndProteins(WaitingHandler waitingHandler) throws IllegalArgumentException, SQLException, IOException, ClassNotFoundException, InterruptedException
waitingHandler
- the waiting handler displaying the progress. Can be
null. The progress will be displayed as secondary.
IllegalArgumentException
SQLException
IOException
ClassNotFoundException
InterruptedException
public void buildPeptidesAndProteins(String spectrumMatchKey) throws IllegalArgumentException, SQLException, IOException, ClassNotFoundException, InterruptedException
spectrumMatchKey
- The key of the spectrum match to add
IllegalArgumentException
SQLException
ClassNotFoundException
IOException
InterruptedException
public void addSpectrumMatch(Set<SpectrumMatch> spectrumMatches) throws FileNotFoundException, IOException, IllegalArgumentException, SQLException, ClassNotFoundException
spectrumMatches
- The spectrum matches
FileNotFoundException
- exception thrown whenever an error occurred
while saving the file
IOException
- exception thrown whenever an error occurred while
saving the file
IllegalArgumentException
- exception thrown whenever an error
occurred while saving the file
SQLException
- exception thrown whenever an error occurred while
saving the file
ClassNotFoundException
- exception thrown whenever an error
occurred while saving the filepublic int getMethodUsed()
public HashMap<String,ArrayList<String>> getProteinMap()
public String getFileName(String key)
key
- the key of the match
public Boolean isDB()
public void setIsDB(Boolean isDB)
isDB
- a boolean indicating whether the identification matches
should be stored in a database or serialized filespublic void close() throws SQLException
SQLException
- exception thrown whenever an error occurred while
closing the database connectionpublic IdentificationMatch.MatchType getMatchType(String matchKey)
matchKey
- the match key
public void establishConnection(String dbFolder, boolean deleteOldDatabase, ObjectsCache objectsCache) throws SQLException
dbFolder
- the absolute path to the folder where the database is
locateddeleteOldDatabase
- if true, tries to delete the old databaseobjectsCache
-
SQLException
- exception thrown whenever an error occurred while
establishing the connectionpublic void convert(WaitingHandler waitingHandler, String newDirectory, String newName, ObjectsCache objectsCache, File directory) throws FileNotFoundException, IOException, ClassNotFoundException, SQLException
waitingHandler
- the waiting handlernewDirectory
- the new directory where to store the datanewName
- objectsCache
- directory
- the directory where the data is currently stored
FileNotFoundException
- exception thrown whenever a file is not
found
IOException
- exception thrown whenever an error occurred while
reading/writing a file
ClassNotFoundException
- exception thrown whenever an error
occurred while deserializing a match
SQLException
- exception thrown whenever an error occurred while
interacting with the databasepublic void updateSpectrumMapping()
public static String getDefaultReference(String experimentReference, String sampleReference, int replicateNumber)
experimentReference
- the experiment referencesampleReference
- the sample referencereplicateNumber
- the replicate number
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |