public abstract class Identification extends ExperimentObject
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
EXTENTION
Deprecated.
use the database methods instead
|
protected java.util.ArrayList<java.lang.String> |
longKeys
Deprecated.
use the database instead
|
protected int |
methodUsed
The method used.
|
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 |
reference
The reference of the identification.
|
protected java.lang.String |
serializationDirectory
The directory where matches will be serialized/the database stored.
|
protected java.util.ArrayList<java.lang.String> |
spectrumIdentification
Deprecated.
use file specific mapping instead
|
protected java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> |
spectrumIdentificationMap
List of all imported PSMs indexed by mgf file name.
|
protected java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,UrParameter>> |
urParameters
Deprecated.
use the database instead
|
| Constructor and Description |
|---|
Identification() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMatchParameter(java.lang.String key,
UrParameter urParameter)
Deprecated.
use the database match specific methods instead
|
void |
addPeptideMatchParameter(java.lang.String key,
UrParameter urParameter)
Adds a peptide match parameter to the database.
|
void |
addProteinMatchParameter(java.lang.String key,
UrParameter urParameter)
Adds a protein match parameter to the database.
|
void |
addSpectrumMatch(java.util.Set<SpectrumMatch> spectrumMatches,
boolean ascendingScore)
Add a set of spectrumMatches to the model.
|
void |
addSpectrumMatch(SpectrumMatch newMatch,
boolean ascendingScore)
Adds a spectrum match to the identification.
|
void |
addSpectrumMatchParameter(java.lang.String key,
UrParameter urParameter)
Adds a spectrum match parameter to the database.
|
void |
buildPeptidesAndProteins(java.lang.String spectrumMatchKey,
AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance)
Creates the peptides and protein instances based on the given spectrum
match.
|
void |
buildPeptidesAndProteins(WaitingHandler waitingHandler,
AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance)
Creates the peptides and protein instances based on the spectrum matches.
|
void |
close()
Closes the database connection.
|
void |
convert(WaitingHandler waitingHandler,
java.lang.String newDirectory,
java.lang.String newName,
ObjectsCache objectsCache,
java.io.File directory)
Converts a serialization based structure into a database based one.
|
void |
establishConnection(java.lang.String dbFolder,
boolean deleteOldDatabase,
ObjectsCache objectsCache)
Establishes a connection to the database.
|
static java.lang.String |
getDefaultReference(java.lang.String experimentReference,
java.lang.String sampleReference,
int replicateNumber)
Returns the default reference for an identification.
|
java.lang.String |
getFileName(java.lang.String key)
Deprecated.
use the database methods instead
|
UrParameter |
getMatchParameter(java.lang.String matchKey,
UrParameter urParameter)
Deprecated.
use the database match specific methods instead
|
IdentificationMatch.MatchType |
getMatchType(java.lang.String matchKey)
Returns the kind of match pointed by the given key in the identification
mappings.
|
int |
getMethodUsed()
Getter for the identification method used.
|
java.util.ArrayList<java.lang.String> |
getOrderedSpectrumFileNames()
Returns the ordered list of spectrum file names.
|
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.
|
PeptideMatch |
getPeptideMatch(java.lang.String peptideKey,
boolean useDB)
Returns a peptide match.
|
UrParameter |
getPeptideMatchParameter(java.lang.String key,
UrParameter urParameter)
Returns the desired peptide match parameter.
|
UrParameter |
getPeptideMatchParameter(java.lang.String key,
UrParameter urParameter,
boolean useDB)
Returns the desired peptide match parameter.
|
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.
|
ProteinMatch |
getProteinMatch(java.lang.String proteinKey,
boolean useDB)
Returns a protein match.
|
java.util.ArrayList<java.lang.String> |
getProteinMatches(Peptide peptide)
Returns the keys of the protein matches where a peptide can be found.
|
UrParameter |
getProteinMatchParameter(java.lang.String key,
UrParameter urParameter)
Returns the desired protein match parameter.
|
UrParameter |
getProteinMatchParameter(java.lang.String key,
UrParameter urParameter,
boolean useDB)
Returns the desired protein match parameter.
|
java.lang.String |
getSerializationDirectory()
Returns the serialization directory.
|
java.util.ArrayList<java.lang.String> |
getSpectrumFiles()
Returns the names of the mgf files used in the spectrum identification
map as a list.
|
java.util.ArrayList<java.lang.String> |
getSpectrumIdentification()
Deprecated.
use file specific names instead
|
java.util.ArrayList<java.lang.String> |
getSpectrumIdentification(java.lang.String spectrumFile)
Returns the keys of the spectrum identifications for a given spectrum
file name.
|
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> |
getSpectrumIdentificationMap()
Returns the keys of all identified spectra indexed by the spectrum file.
|
int |
getSpectrumIdentificationSize()
Returns the number of spectrum identifications.
|
SpectrumMatch |
getSpectrumMatch(java.lang.String spectrumKey)
Returns a spectrum match.
|
SpectrumMatch |
getSpectrumMatch(java.lang.String spectrumKey,
boolean useDB)
Returns a spectrum match.
|
UrParameter |
getSpectrumMatchParameter(java.lang.String key,
UrParameter urParameter)
Returns the desired spectrum match parameter.
|
UrParameter |
getSpectrumMatchParameter(java.lang.String key,
UrParameter urParameter,
boolean useDB)
Returns the desired spectrum match parameter.
|
java.lang.Boolean |
isDB()
Indicates whether the identification matches should be stored in a
database (true, default value) or serialized files (false, deprecated
default).
|
boolean |
isUnique(Peptide peptide)
Indicates whether a peptide is found in a single protein match.
|
void |
loadPeptideMatches(java.util.ArrayList<java.lang.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(java.util.ArrayList<java.lang.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(java.util.ArrayList<java.lang.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(java.util.ArrayList<java.lang.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(java.util.ArrayList<java.lang.String> spectrumKeys,
WaitingHandler waitingHandler)
Loads the given spectrum matches in the cache of the database.
|
void |
loadSpectrumMatches(java.lang.String fileName,
WaitingHandler waitingHandler)
Loads all spectrum matches of the file in the cache of the database
|
void |
loadSpectrumMatchParameters(java.util.ArrayList<java.lang.String> spectrumKeys,
UrParameter urParameter,
WaitingHandler waitingHandler)
Loads all desired spectrum match parameters in the cache of the database.
|
void |
loadSpectrumMatchParameters(java.lang.String fileName,
UrParameter urParameter,
WaitingHandler waitingHandler)
Loads all spectrum match parameters of the given type in the cache of the
database
|
boolean |
matchExists(java.lang.String matchKey)
Indicates whether a match indexed by the given key exists.
|
boolean |
peptideDetailsInCache(java.lang.String peptideKey)
Indicates whether the peptide and spectrum matches corresponding to a
peptide match key are loaded in the cache.
|
boolean |
proteinDetailsInCache(java.lang.String proteinKey)
Indicates whether the protein, peptide and spectrum matches corresponding
to a protein match key are loaded in the cache.
|
void |
removeMatch(java.lang.String matchKey)
Deprecated.
it is advised to use the specific psm/peptide/protein method
instead
|
void |
removePeptideMatch(java.lang.String matchKey)
Removes a peptide match from the model.
|
void |
removeProteinMatch(java.lang.String matchKey)
Removes a protein match from the model.
|
void |
removeSpectrumMatch(java.lang.String matchKey)
Removes a spectrum match from the model.
|
void |
setDirectory(java.lang.String serializationDirectory,
boolean deleteOldDatabase)
Deprecated.
use establishConnection(String dbFolder) instead
|
void |
setIsDB(java.lang.Boolean isDB)
Sets whether the identification matches should be stored in a database or
serialized files.
|
void |
setOrderedListOfSpectrumFileNames(java.util.ArrayList<java.lang.String> orderedSpectrumFileNames)
Set the ordered list of spectrum file names.
|
void |
updatePeptideMatch(PeptideMatch peptideMatch)
Updates a peptide match in the database.
|
void |
updatePeptideMatchParameter(java.lang.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(java.lang.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(java.lang.String key,
UrParameter urParameter)
Updates a spectrum match parameter in the database.
|
addUrParam, getParameterKey, getUrParampublic 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.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> spectrumIdentificationMap
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 java.lang.String serializationDirectory
protected java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,UrParameter>> urParameters
protected java.util.ArrayList<java.lang.String> longKeys
protected java.lang.String reference
public java.util.ArrayList<java.lang.String> getOrderedSpectrumFileNames()
public void setOrderedListOfSpectrumFileNames(java.util.ArrayList<java.lang.String> orderedSpectrumFileNames)
throws java.lang.IllegalArgumentException
orderedSpectrumFileNames - the ordered list of spectrum file namesjava.lang.IllegalArgumentException - thrown if the length of the ordered file
names as to be the same as the number of spectrum filespublic java.util.ArrayList<java.lang.String> getSpectrumFiles()
public int getSpectrumIdentificationSize()
public void addMatchParameter(java.lang.String key,
UrParameter urParameter)
throws java.sql.SQLException,
java.io.IOException,
java.lang.InterruptedException
key - the key of the parameterurParameter - the additional parameterjava.lang.InterruptedExceptionjava.sql.SQLException - exception thrown whenever an error occurred while
adding the object in the databasejava.io.IOException - exception thrown whenever an error occurred while
writing the objectpublic UrParameter getMatchParameter(java.lang.String matchKey, UrParameter urParameter) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InterruptedException
matchKey - the match keyurParameter - example of parameter to retrievejava.lang.InterruptedExceptionjava.sql.SQLException - exception thrown whenever an error occurred while
loading the object from the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the object in the databasejava.lang.ClassNotFoundException - exception thrown whenever an error
occurred while casting the database input in the desired match classpublic void loadSpectrumMatchParameters(java.lang.String fileName,
UrParameter urParameter,
WaitingHandler waitingHandler)
throws java.sql.SQLException,
java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.InterruptedException
fileName - the file nameurParameter - the parameter typewaitingHandler - the waiting handlerjava.sql.SQLException - exception thrown whenever an error occurred while
interrogating the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the databasejava.lang.ClassNotFoundException - exception thrown whenever the class of the
object is not found when deserializing it.java.lang.InterruptedExceptionpublic void loadSpectrumMatchParameters(java.util.ArrayList<java.lang.String> spectrumKeys,
UrParameter urParameter,
WaitingHandler waitingHandler)
throws java.sql.SQLException,
java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.InterruptedException
spectrumKeys - the key of the spectrum match of the parameters to be
loadedurParameter - the parameter typewaitingHandler - the waiting handlerjava.sql.SQLException - exception thrown whenever an error occurred while
interrogating the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the databasejava.lang.ClassNotFoundException - exception thrown whenever the class of the
object is not found when deserializing it.java.lang.InterruptedExceptionpublic void loadPeptideMatchParameters(UrParameter urParameter, WaitingHandler waitingHandler) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InterruptedException
urParameter - the parameter typewaitingHandler - the waiting handlerjava.sql.SQLException - exception thrown whenever an error occurred while
interrogating the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the databasejava.lang.ClassNotFoundException - exception thrown whenever the class of the
object is not found when deserializing it.java.lang.InterruptedExceptionpublic void loadPeptideMatchParameters(java.util.ArrayList<java.lang.String> peptideKeys,
UrParameter urParameter,
WaitingHandler waitingHandler)
throws java.sql.SQLException,
java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.InterruptedException
peptideKeys - the list of peptide keys of the parameters to loadurParameter - the parameter typewaitingHandler - the waiting handlerjava.sql.SQLException - exception thrown whenever an error occurred while
interrogating the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the databasejava.lang.ClassNotFoundException - exception thrown whenever the class of the
object is not found when deserializing it.java.lang.InterruptedExceptionpublic void loadPeptideMatches(java.util.ArrayList<java.lang.String> peptideKeys,
WaitingHandler waitingHandler)
throws java.sql.SQLException,
java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.InterruptedException
peptideKeys - the list of peptide keys to loadwaitingHandler - the waiting handlerjava.sql.SQLException - exception thrown whenever an error occurred while
interrogating the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the databasejava.lang.ClassNotFoundException - exception thrown whenever the class of the
object is not found when deserializing it.java.lang.InterruptedExceptionpublic void loadProteinMatchParameters(UrParameter urParameter, WaitingHandler waitingHandler) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InterruptedException
urParameter - the parameter typewaitingHandler - the waiting handlerjava.sql.SQLException - exception thrown whenever an error occurred while
interrogating the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the databasejava.lang.ClassNotFoundException - exception thrown whenever the class of the
object is not found when deserializing it.java.lang.InterruptedExceptionpublic void loadProteinMatchParameters(java.util.ArrayList<java.lang.String> proteinKeys,
UrParameter urParameter,
WaitingHandler waitingHandler)
throws java.sql.SQLException,
java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.InterruptedException
proteinKeys - the list of protein keys of the parameters to loadurParameter - the parameter typewaitingHandler - the waiting handlerjava.sql.SQLException - exception thrown whenever an error occurred while
interrogating the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the databasejava.lang.ClassNotFoundException - exception thrown whenever the class of the
object is not found when deserializing it.java.lang.InterruptedExceptionpublic void loadProteinMatches(WaitingHandler waitingHandler) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InterruptedException
waitingHandler - the waiting handlerjava.sql.SQLException - exception thrown whenever an error occurred while
interrogating the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the databasejava.lang.ClassNotFoundException - exception thrown whenever the class of the
object is not found when deserializing it.java.lang.InterruptedExceptionpublic void loadProteinMatches(java.util.ArrayList<java.lang.String> proteinKeys,
WaitingHandler waitingHandler)
throws java.sql.SQLException,
java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.InterruptedException
proteinKeys - the list of protein keys to loadwaitingHandler - the waiting handlerjava.sql.SQLException - exception thrown whenever an error occurred while
interrogating the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the databasejava.lang.ClassNotFoundException - exception thrown whenever the class of the
object is not found when deserializing it.java.lang.InterruptedExceptionpublic void loadPeptideMatches(WaitingHandler waitingHandler) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InterruptedException
waitingHandler - the waiting handlerjava.sql.SQLException - exception thrown whenever an error occurred while
interrogating the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the databasejava.lang.ClassNotFoundException - exception thrown whenever the class of the
object is not found when deserializing it.java.lang.InterruptedExceptionpublic void loadSpectrumMatches(java.lang.String fileName,
WaitingHandler waitingHandler)
throws java.sql.SQLException,
java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.InterruptedException
fileName - the file namewaitingHandler - the waiting handlerjava.sql.SQLException - exception thrown whenever an error occurred while
interrogating the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the databasejava.lang.ClassNotFoundException - exception thrown whenever the class of the
object is not found when deserializing it.java.lang.InterruptedExceptionpublic void loadSpectrumMatches(java.util.ArrayList<java.lang.String> spectrumKeys,
WaitingHandler waitingHandler)
throws java.sql.SQLException,
java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.InterruptedException
spectrumKeys - the spectrum keyswaitingHandler - the waiting handlerjava.sql.SQLException - exception thrown whenever an error occurred while
interrogating the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the databasejava.lang.ClassNotFoundException - exception thrown whenever the class of the
object is not found when deserializing it.java.lang.InterruptedExceptionpublic UrParameter getSpectrumMatchParameter(java.lang.String key, UrParameter urParameter) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InterruptedException
key - the PSM keyurParameter - the match parameterjava.sql.SQLException - exception thrown whenever an error occurred while
loading the object from the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the object in the databasejava.lang.ClassNotFoundException - exception thrown whenever an error
occurred while casting the database input in the desired match classjava.lang.InterruptedExceptionpublic UrParameter getSpectrumMatchParameter(java.lang.String key, UrParameter urParameter, boolean useDB) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InterruptedException
key - the PSM keyurParameter - the match parameteruseDB - if useDB is false, null will be returned if the object is
not in the cachejava.sql.SQLException - exception thrown whenever an error occurred while
loading the object from the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the object in the databasejava.lang.ClassNotFoundException - exception thrown whenever an error
occurred while casting the database input in the desired match classjava.lang.InterruptedExceptionpublic void addSpectrumMatchParameter(java.lang.String key,
UrParameter urParameter)
throws java.sql.SQLException,
java.io.IOException,
java.lang.InterruptedException
key - the psm keyurParameter - the match parameterjava.sql.SQLException - exception thrown whenever an error occurred while
adding the object in the databasejava.io.IOException - exception thrown whenever an error occurred while
writing the objectjava.lang.InterruptedExceptionpublic UrParameter getPeptideMatchParameter(java.lang.String key, UrParameter urParameter) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InterruptedException
key - the peptide keyurParameter - the match parameterjava.sql.SQLException - exception thrown whenever an error occurred while
loading the object from the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the object in the databasejava.lang.ClassNotFoundException - exception thrown whenever an error
occurred while casting the database input in the desired match classjava.lang.InterruptedExceptionpublic UrParameter getPeptideMatchParameter(java.lang.String key, UrParameter urParameter, boolean useDB) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InterruptedException
key - the peptide keyurParameter - the match parameteruseDB - if useDB is false, null will be returned if the object is
not in the cachejava.sql.SQLException - exception thrown whenever an error occurred while
loading the object from the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the object in the databasejava.lang.ClassNotFoundException - exception thrown whenever an error
occurred while casting the database input in the desired match classjava.lang.InterruptedExceptionpublic void addPeptideMatchParameter(java.lang.String key,
UrParameter urParameter)
throws java.sql.SQLException,
java.io.IOException,
java.lang.InterruptedException
key - the peptide keyurParameter - the match parameterjava.sql.SQLException - exception thrown whenever an error occurred while
adding the object in the databasejava.io.IOException - exception thrown whenever an error occurred while
writing the objectjava.lang.InterruptedExceptionpublic UrParameter getProteinMatchParameter(java.lang.String key, UrParameter urParameter) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InterruptedException
key - the protein keyurParameter - the match parameterjava.sql.SQLException - exception thrown whenever an error occurred while
loading the object from the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the object in the databasejava.lang.ClassNotFoundException - exception thrown whenever an error
occurred while casting the database input in the desired match classjava.lang.InterruptedExceptionpublic UrParameter getProteinMatchParameter(java.lang.String key, UrParameter urParameter, boolean useDB) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InterruptedException
key - the protein keyurParameter - the match parameteruseDB - if useDB is false, null will be returned if the object is
not in the cachejava.sql.SQLException - exception thrown whenever an error occurred while
loading the object from the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the object in the databasejava.lang.ClassNotFoundException - exception thrown whenever an error
occurred while casting the database input in the desired match classjava.lang.InterruptedExceptionpublic void addProteinMatchParameter(java.lang.String key,
UrParameter urParameter)
throws java.sql.SQLException,
java.io.IOException,
java.lang.InterruptedException
key - the protein keyurParameter - the match parameterjava.sql.SQLException - exception thrown whenever an error occurred while
adding the object in the databasejava.io.IOException - exception thrown whenever an error occurred while
writing the objectjava.lang.InterruptedExceptionpublic void updateProteinMatchParameter(java.lang.String key,
UrParameter urParameter)
throws java.sql.SQLException,
java.io.IOException
key - the protein keyurParameter - the match parameterjava.sql.SQLException - exception thrown whenever an error occurred while
adding the object in the databasejava.io.IOException - exception thrown whenever an error occurred while
writing the objectpublic void updatePeptideMatchParameter(java.lang.String key,
UrParameter urParameter)
throws java.sql.SQLException,
java.io.IOException
key - the peptide keyurParameter - the match parameterjava.sql.SQLException - exception thrown whenever an error occurred while
adding the object in the databasejava.io.IOException - exception thrown whenever an error occurred while
writing the objectpublic void updateSpectrumMatchParameter(java.lang.String key,
UrParameter urParameter)
throws java.sql.SQLException,
java.io.IOException
key - the spectrum keyurParameter - the match parameterjava.sql.SQLException - exception thrown whenever an error occurred while
adding the object in the databasejava.io.IOException - exception thrown whenever an error occurred while
writing the objectpublic void updateSpectrumMatch(SpectrumMatch spectrumMatch) throws java.sql.SQLException, java.io.IOException
spectrumMatch - the matchjava.sql.SQLException - exception thrown whenever an error occurred while
adding the object in the databasejava.io.IOException - exception thrown whenever an error occurred while
writing the objectpublic void updatePeptideMatch(PeptideMatch peptideMatch) throws java.sql.SQLException, java.io.IOException
peptideMatch - the matchjava.sql.SQLException - exception thrown whenever an error occurred while
adding the object in the databasejava.io.IOException - exception thrown whenever an error occurred while
writing the objectpublic void updateProteinMatch(ProteinMatch proteinMatch) throws java.sql.SQLException, java.io.IOException
proteinMatch - the matchjava.sql.SQLException - exception thrown whenever an error occurred while
adding the object in the databasejava.io.IOException - exception thrown whenever an error occurred while
writing the objectpublic java.lang.String getSerializationDirectory()
public void setDirectory(java.lang.String serializationDirectory,
boolean deleteOldDatabase)
throws java.sql.SQLException
serializationDirectory - the path of the directorydeleteOldDatabase - if true, tries to delete the old databasejava.sql.SQLExceptionpublic void removeMatch(java.lang.String matchKey)
throws java.lang.IllegalArgumentException,
java.sql.SQLException,
java.io.IOException
matchKey - the key of the match to removejava.lang.IllegalArgumentExceptionjava.sql.SQLException - exception thrown whenever an error occurred while
deleting the matchjava.io.IOExceptionpublic void removeSpectrumMatch(java.lang.String matchKey)
throws java.lang.IllegalArgumentException,
java.sql.SQLException,
java.io.IOException
matchKey - the key of the match to removejava.lang.IllegalArgumentExceptionjava.sql.SQLException - exception thrown whenever an error occurred while
deleting the matchjava.io.IOExceptionpublic void removePeptideMatch(java.lang.String matchKey)
throws java.lang.IllegalArgumentException,
java.sql.SQLException,
java.io.IOException
matchKey - the key of the match to removejava.lang.IllegalArgumentExceptionjava.sql.SQLException - exception thrown whenever an error occurred while
deleting the matchjava.io.IOExceptionpublic void removeProteinMatch(java.lang.String matchKey)
throws java.lang.IllegalArgumentException,
java.sql.SQLException,
java.io.IOException
matchKey - the key of the match to removejava.lang.IllegalArgumentExceptionjava.sql.SQLException - exception thrown whenever an error occurred while
deleting the matchjava.io.IOExceptionpublic boolean matchExists(java.lang.String matchKey)
matchKey - the key of the match looked forpublic SpectrumMatch getSpectrumMatch(java.lang.String spectrumKey) throws java.lang.IllegalArgumentException, java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InterruptedException
spectrumKey - the key of the matchjava.lang.IllegalArgumentException - exception thrown whenever an error
occurred while retrieving the matchjava.sql.SQLException - exception thrown whenever an error occurred while
loading the object from the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the object in the databasejava.lang.ClassNotFoundException - exception thrown whenever an error
occurred while casting the database input in the desired match classjava.lang.InterruptedExceptionpublic SpectrumMatch getSpectrumMatch(java.lang.String spectrumKey, boolean useDB) throws java.lang.IllegalArgumentException, java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InterruptedException
spectrumKey - the key of the matchuseDB - if useDB is false, null will be returned if the object is
not in the cachejava.lang.IllegalArgumentException - exception thrown whenever an error
occurred while retrieving the matchjava.sql.SQLException - exception thrown whenever an error occurred while
loading the object from the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the object in the databasejava.lang.ClassNotFoundException - exception thrown whenever an error
occurred while casting the database input in the desired match classjava.lang.InterruptedExceptionpublic PeptideMatch getPeptideMatch(java.lang.String peptideKey) throws java.lang.IllegalArgumentException, java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InterruptedException
peptideKey - the key of the matchjava.lang.IllegalArgumentException - exception thrown whenever an error
occurred while retrieving the matchjava.sql.SQLException - exception thrown whenever an error occurred while
loading the object from the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the object in the databasejava.lang.ClassNotFoundException - exception thrown whenever an error
occurred while casting the database input in the desired match classjava.lang.InterruptedExceptionpublic PeptideMatch getPeptideMatch(java.lang.String peptideKey, boolean useDB) throws java.lang.IllegalArgumentException, java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InterruptedException
peptideKey - the key of the matchuseDB - if useDB is false, null will be returned if the object is
not in the cachejava.lang.IllegalArgumentException - exception thrown whenever an error
occurred while retrieving the matchjava.sql.SQLException - exception thrown whenever an error occurred while
loading the object from the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the object in the databasejava.lang.ClassNotFoundException - exception thrown whenever an error
occurred while casting the database input in the desired match classjava.lang.InterruptedExceptionpublic ProteinMatch getProteinMatch(java.lang.String proteinKey) throws java.lang.IllegalArgumentException, java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InterruptedException
proteinKey - the key of the matchjava.lang.IllegalArgumentException - exception thrown whenever an error
occurred while retrieving the matchjava.sql.SQLException - exception thrown whenever an error occurred while
loading the object from the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the object in the databasejava.lang.ClassNotFoundException - exception thrown whenever an error
occurred while casting the database input in the desired match classjava.lang.InterruptedExceptionpublic ProteinMatch getProteinMatch(java.lang.String proteinKey, boolean useDB) throws java.lang.IllegalArgumentException, java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InterruptedException
proteinKey - the key of the matchuseDB - if useDB is false, null will be returned if the object is
not in the cachejava.lang.IllegalArgumentException - exception thrown whenever an error
occurred while retrieving the matchjava.sql.SQLException - exception thrown whenever an error occurred while
loading the object from the databasejava.io.IOException - exception thrown whenever an error occurred while
reading the object in the databasejava.lang.ClassNotFoundException - exception thrown whenever an error
occurred while casting the database input in the desired match classjava.lang.InterruptedExceptionpublic boolean proteinDetailsInCache(java.lang.String proteinKey)
throws java.lang.IllegalArgumentException,
java.sql.SQLException,
java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.InterruptedException
proteinKey - the key of the protein matchjava.lang.IllegalArgumentExceptionjava.sql.SQLExceptionjava.io.IOExceptionjava.lang.ClassNotFoundExceptionjava.lang.InterruptedExceptionpublic boolean peptideDetailsInCache(java.lang.String peptideKey)
throws java.lang.IllegalArgumentException,
java.sql.SQLException,
java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.InterruptedException
peptideKey - the peptide keyjava.lang.IllegalArgumentExceptionjava.sql.SQLExceptionjava.io.IOExceptionjava.lang.ClassNotFoundExceptionjava.lang.InterruptedExceptionpublic java.util.ArrayList<java.lang.String> getProteinIdentification()
public java.util.ArrayList<java.lang.String> getPeptideIdentification()
public java.util.ArrayList<java.lang.String> getSpectrumIdentification()
public java.util.ArrayList<java.lang.String> getSpectrumIdentification(java.lang.String spectrumFile)
spectrumFile - the name of the spectrum filepublic java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> getSpectrumIdentificationMap()
public void addSpectrumMatch(SpectrumMatch newMatch, boolean ascendingScore) throws java.io.FileNotFoundException, java.io.IOException, java.lang.IllegalArgumentException, java.sql.SQLException, java.lang.ClassNotFoundException, java.lang.InterruptedException
newMatch - the new matchascendingScore - indicates whether the score is ascending when hits get betterjava.io.FileNotFoundException - exception thrown whenever an error occurred
while saving the filejava.io.IOException - exception thrown whenever an error occurred while
saving the filejava.lang.IllegalArgumentException - exception thrown whenever an error
occurred while saving the filejava.sql.SQLException - exception thrown whenever an error occurred while
saving the filejava.lang.ClassNotFoundException - exception thrown whenever an error
occurred while saving the filejava.lang.InterruptedExceptionpublic void buildPeptidesAndProteins(WaitingHandler waitingHandler, AminoAcidPattern.MatchingType matchingType, java.lang.Double massTolerance) throws java.lang.IllegalArgumentException, java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InterruptedException
waitingHandler - the waiting handler displaying the progress. Can be
null. The progress will be displayed as secondary.matchingType - the amino acid matching type to use to create peptide
matchesmassTolerance - the mass tolerancejava.lang.IllegalArgumentExceptionjava.sql.SQLExceptionjava.io.IOExceptionjava.lang.ClassNotFoundExceptionjava.lang.InterruptedExceptionpublic void buildPeptidesAndProteins(java.lang.String spectrumMatchKey,
AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance)
throws java.lang.IllegalArgumentException,
java.sql.SQLException,
java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.InterruptedException
spectrumMatchKey - The key of the spectrum match to addmatchingType - the amino acid matching type to use to create peptide
matchesmassTolerance - the mass tolerancejava.lang.IllegalArgumentExceptionjava.sql.SQLExceptionjava.lang.ClassNotFoundExceptionjava.io.IOExceptionjava.lang.InterruptedExceptionpublic void addSpectrumMatch(java.util.Set<SpectrumMatch> spectrumMatches, boolean ascendingScore) throws java.io.FileNotFoundException, java.io.IOException, java.lang.IllegalArgumentException, java.sql.SQLException, java.lang.ClassNotFoundException, java.lang.InterruptedException
spectrumMatches - The spectrum matchesascendingScore - indicates whether the score is ascending when hits get betterjava.io.FileNotFoundException - exception thrown whenever an error occurred
while saving the filejava.io.IOException - exception thrown whenever an error occurred while
saving the filejava.lang.IllegalArgumentException - exception thrown whenever an error
occurred while saving the filejava.sql.SQLException - exception thrown whenever an error occurred while
saving the filejava.lang.ClassNotFoundException - exception thrown whenever an error
occurred while saving the filejava.lang.InterruptedExceptionpublic int getMethodUsed()
public java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> getProteinMap()
public java.lang.String getFileName(java.lang.String key)
key - the key of the matchpublic java.lang.Boolean isDB()
public void setIsDB(java.lang.Boolean isDB)
isDB - a boolean indicating whether the identification matches
should be stored in a database or serialized filespublic void close()
throws java.sql.SQLException
java.sql.SQLException - exception thrown whenever an error occurred while
closing the database connectionpublic IdentificationMatch.MatchType getMatchType(java.lang.String matchKey)
matchKey - the match keypublic void establishConnection(java.lang.String dbFolder,
boolean deleteOldDatabase,
ObjectsCache objectsCache)
throws java.sql.SQLException
dbFolder - the absolute path to the folder where the database is
locateddeleteOldDatabase - if true, tries to delete the old databaseobjectsCache - java.sql.SQLException - exception thrown whenever an error occurred while
establishing the connectionpublic void convert(WaitingHandler waitingHandler, java.lang.String newDirectory, java.lang.String newName, ObjectsCache objectsCache, java.io.File directory) throws java.io.FileNotFoundException, java.io.IOException, java.lang.ClassNotFoundException, java.sql.SQLException, java.lang.InterruptedException
waitingHandler - the waiting handlernewDirectory - the new directory where to store the datanewName - objectsCache - directory - the directory where the data is currently storedjava.io.FileNotFoundException - exception thrown whenever a file is not
foundjava.io.IOException - exception thrown whenever an error occurred while
reading/writing a filejava.lang.ClassNotFoundException - exception thrown whenever an error
occurred while deserializing a matchjava.sql.SQLException - exception thrown whenever an error occurred while
interacting with the databasejava.lang.InterruptedExceptionpublic void updateSpectrumMapping()
public static java.lang.String getDefaultReference(java.lang.String experimentReference,
java.lang.String sampleReference,
int replicateNumber)
experimentReference - the experiment referencesampleReference - the sample referencereplicateNumber - the replicate numberpublic java.util.ArrayList<java.lang.String> getProteinMatches(Peptide peptide) throws java.io.IOException, java.sql.SQLException, java.lang.ClassNotFoundException, java.lang.InterruptedException
peptide - the peptide of interestjava.io.IOExceptionjava.sql.SQLExceptionjava.lang.InterruptedExceptionjava.lang.ClassNotFoundExceptionpublic boolean isUnique(Peptide peptide) throws java.io.IOException, java.sql.SQLException, java.lang.ClassNotFoundException, java.lang.InterruptedException
peptide - the peptide of interestjava.io.IOExceptionjava.sql.SQLExceptionjava.lang.ClassNotFoundExceptionjava.lang.InterruptedExceptionCopyright © 2014. All Rights Reserved.