public class Identification extends ExperimentObject
NO_KEY
Constructor and Description |
---|
Identification()
Empty default constructor
|
Identification(ObjectsDB objectsDB)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addFraction(String fraction)
Adds a fraction, fractions correspond to the PSM files names.
|
void |
addObject(long key,
Object object)
Adds an object into the database.
|
void |
addObjects(HashMap<Long,Object> objects,
WaitingHandler waitingHandler,
boolean displayProgress)
Adds a list of objects into the database.
|
void |
addPeptideMatch(long key,
PeptideMatch peptideMatch)
Adds a peptide match.
|
void |
addPeptideMatches(HashMap<Long,Object> peptideMatches)
Adds a peptide match.
|
void |
addProteinMatch(long key,
ProteinMatch proteinMatch)
Adds a protein match.
|
void |
addProteinMatches(HashMap<Long,Object> proteinMatches)
Adds a protein match.
|
void |
addSpectrumMatches(HashMap<Long,Object> spectrumMatches,
WaitingHandler waitingHandler,
boolean displayProgress)
Adds a spectrum matches into the database.
|
void |
close(boolean saveCache)
Closes the database connection.
|
boolean |
contains(long key)
Checks if database contains a certain object.
|
HashSet<Long> |
getClassObjects(Class className)
Returns the keys of the objects of the given class,
|
HashSet<Long> |
getClassObjects(Class className,
String filters)
Returns the keys of the objects of the given class,
|
String |
getDatabaseDirectory()
Returns the database directory.
|
ArrayList<String> |
getFractions()
Returns the fractions.
|
IdentificationKeys |
getIdentificationKeys()
Returns the identification keys.
|
int |
getNumber(Class className)
Returns the number of objects of a given class
|
ObjectsDB |
getObjectsDB()
Returns the objects database used in this class.
|
HashSet<Long> |
getPeptideIdentification()
Returns a list of the keys of all encountered peptides.
|
PeptideMatch |
getPeptideMatch(long key)
Returns the peptide match with the given key.
|
PeptideMatchesIterator |
getPeptideMatchesIterator(long[] peptideKeys,
WaitingHandler waitingHandler)
Returns a peptide matches iterator for a given key list.
|
PeptideMatchesIterator |
getPeptideMatchesIterator(WaitingHandler waitingHandler)
Returns a peptide matches iterator for all PeptideMatches.
|
HashSet<Long> |
getProteinIdentification()
Returns a list of the keys of all encountered proteins.
|
HashMap<String,HashSet<Long>> |
getProteinMap()
Returns a map of all the protein matches which can be ascribed to a
protein indexed by its accession.
|
ProteinMatch |
getProteinMatch(long key)
Returns the protein match with the given key.
|
TreeSet<Long> |
getProteinMatches(long peptideKey)
Returns the keys of the protein matches where a peptide can be found.
|
ProteinMatchesIterator |
getProteinMatchesIterator(long[] proteinKeys,
WaitingHandler waitingHandler)
Returns a protein matches iterator for a given key list.
|
ProteinMatchesIterator |
getProteinMatchesIterator(WaitingHandler waitingHandler)
Returns a protein matches iterator for all PeptideMatches.
|
HashMap<String,HashSet<Long>> |
getSpectrumIdentification()
Returns a map of the spectrum matches keys indexed by spectrum file name.
|
HashSet<Long> |
getSpectrumIdentificationKeys()
Returns the keys of all the spectrum matches in the db.
|
int |
getSpectrumIdentificationSize()
Returns the number of spectrum identifications.
|
SpectrumMatch |
getSpectrumMatch(long key)
Returns the spectrum match with the given key.
|
SpectrumMatchesIterator |
getSpectrumMatchesIterator(long[] spectrumMatches,
WaitingHandler waitingHandler)
Returns a spectrum matches iterator for a given key list.
|
SpectrumMatchesIterator |
getSpectrumMatchesIterator(WaitingHandler waitingHandler)
Returns a spectrum matches iterator for all SpectrumMatches.
|
SpectrumMatchesIterator |
getSpectrumMatchesIterator(WaitingHandler waitingHandler,
String filters)
Returns a psm iterator for all SpectrumMatches.
|
boolean |
isConnectionActive()
Indicates whether the connection to the DB is active.
|
void |
loadObjects(ArrayList<Long> keyList,
WaitingHandler waitingHandler,
boolean displayProgress)
Loads all objects of given keys in cache.
|
void |
loadObjects(Class className,
WaitingHandler waitingHandler,
boolean displayProgress)
Loads all objects of the class in cache.
|
void |
removeObject(long key)
Removes an object from the database.
|
void |
removeObjects(ArrayList<Long> keys,
WaitingHandler waitingHandler,
boolean displayProgress)
Remove a list of objects from the database.
|
Object |
retrieveObject(long longKey)
Returns an array of all objects of a given list of keys
|
ArrayList<Object> |
retrieveObjects(Class className,
WaitingHandler waitingHandler,
boolean displayProgress)
Returns an array of all objects of a given class
|
ArrayList<Object> |
retrieveObjects(Collection<Long> keyList,
WaitingHandler waitingHandler,
boolean displayProgress)
Returns an array of all objects of a given list of keys
|
void |
setFractions(ArrayList<String> fractions)
Sets the fractions.
|
void |
setIdentificationKeys(IdentificationKeys identificationKeys)
Sets the identification keys.
|
void |
updateObject(long key,
Object object)
Updates an object in the database.
|
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
public Identification()
public Identification(ObjectsDB objectsDB)
objectsDB
- The object database used to store the objects.public ObjectsDB getObjectsDB()
public IdentificationKeys getIdentificationKeys()
public void setIdentificationKeys(IdentificationKeys identificationKeys)
identificationKeys
- the identification keyspublic HashMap<String,HashSet<Long>> getSpectrumIdentification()
public HashSet<Long> getSpectrumIdentificationKeys()
public int getSpectrumIdentificationSize()
public int getNumber(Class className)
className
- the class name of a given classpublic HashSet<Long> getClassObjects(Class className)
className
- the classpublic HashSet<Long> getClassObjects(Class className, String filters)
className
- the classfilters
- the filterspublic void loadObjects(Class className, WaitingHandler waitingHandler, boolean displayProgress) throws InterruptedException
className
- the class namewaitingHandler
- the waiting handler allowing displaying progress
and canceling the processdisplayProgress
- boolean indicating whether the progress of this
method should be displayed on the waiting handlerInterruptedException
- exception thrown if a threading error occurs
while interacting with the databasepublic void loadObjects(ArrayList<Long> keyList, WaitingHandler waitingHandler, boolean displayProgress) throws InterruptedException
keyList
- the list of keys of given objectswaitingHandler
- the waiting handler allowing displaying progress
and canceling the processdisplayProgress
- boolean indicating whether the progress of this
method should be displayed on the waiting handlerInterruptedException
- exception thrown if a threading error occurs
while interacting with the databasepublic Object retrieveObject(long longKey)
longKey
- the hash keypublic SpectrumMatch getSpectrumMatch(long key)
key
- the key of the matchpublic PeptideMatch getPeptideMatch(long key)
key
- the key of the matchpublic ProteinMatch getProteinMatch(long key)
key
- the key of the matchpublic ArrayList<Object> retrieveObjects(Collection<Long> keyList, WaitingHandler waitingHandler, boolean displayProgress)
keyList
- the key listwaitingHandler
- the waiting handler allowing displaying progress
and canceling the processdisplayProgress
- boolean indicating whether the progress of this
method should be displayed on the waiting handlerpublic ArrayList<Object> retrieveObjects(Class className, WaitingHandler waitingHandler, boolean displayProgress)
className
- the class namewaitingHandler
- the waiting handler allowing displaying progress
and canceling the processdisplayProgress
- boolean indicating whether the progress of this
method should be displayed on the waiting handlerpublic void addObject(long key, Object object)
key
- the key of the objectobject
- the objectpublic void addObjects(HashMap<Long,Object> objects, WaitingHandler waitingHandler, boolean displayProgress)
objects
- the objectwaitingHandler
- the waiting handler allowing displaying progress
and canceling the processdisplayProgress
- boolean indicating whether the progress of this
method should be displayed on the waiting handlerpublic void updateObject(long key, Object object)
key
- the key of the objectobject
- the objectpublic void removeObject(long key)
key
- the key of the objectpublic boolean contains(long key)
key
- the key of the objectpublic void removeObjects(ArrayList<Long> keys, WaitingHandler waitingHandler, boolean displayProgress)
keys
- the list of object keyswaitingHandler
- the waiting handler allowing displaying progress
and canceling the processdisplayProgress
- boolean indicating whether the progress of this
method should be displayed on the waiting handlerpublic String getDatabaseDirectory()
public HashSet<Long> getProteinIdentification()
public HashSet<Long> getPeptideIdentification()
public void addPeptideMatch(long key, PeptideMatch peptideMatch)
key
- the peptide match keypeptideMatch
- the peptide matchpublic void addPeptideMatches(HashMap<Long,Object> peptideMatches)
peptideMatches
- the peptide matches in a mappublic void addSpectrumMatches(HashMap<Long,Object> spectrumMatches, WaitingHandler waitingHandler, boolean displayProgress)
spectrumMatches
- the spectrum matcheswaitingHandler
- the waiting handler allowing displaying progress
and canceling the processdisplayProgress
- boolean indicating whether the progress of this
method should be displayed on the waiting handlerpublic void addProteinMatch(long key, ProteinMatch proteinMatch)
key
- The match key.proteinMatch
- The protein match.public void addProteinMatches(HashMap<Long,Object> proteinMatches)
proteinMatches
- Map of the protein matches indexed by key.public HashMap<String,HashSet<Long>> getProteinMap()
public void close(boolean saveCache)
saveCache
- save the cachepublic boolean isConnectionActive()
public TreeSet<Long> getProteinMatches(long peptideKey)
peptideKey
- the peptide keypublic SpectrumMatchesIterator getSpectrumMatchesIterator(long[] spectrumMatches, WaitingHandler waitingHandler)
spectrumMatches
- the keys of the spectra to iteratewaitingHandler
- the waiting handlerpublic SpectrumMatchesIterator getSpectrumMatchesIterator(WaitingHandler waitingHandler)
waitingHandler
- the waiting handlerpublic SpectrumMatchesIterator getSpectrumMatchesIterator(WaitingHandler waitingHandler, String filters)
waitingHandler
- the waiting handlerfilters
- filters for the classpublic PeptideMatchesIterator getPeptideMatchesIterator(long[] peptideKeys, WaitingHandler waitingHandler)
peptideKeys
- the keys of the peptides to iteratewaitingHandler
- the waiting handlerpublic PeptideMatchesIterator getPeptideMatchesIterator(WaitingHandler waitingHandler)
waitingHandler
- the waiting handlerpublic ProteinMatchesIterator getProteinMatchesIterator(long[] proteinKeys, WaitingHandler waitingHandler)
proteinKeys
- the keys of the peptides to iteratewaitingHandler
- the waiting handlerpublic ProteinMatchesIterator getProteinMatchesIterator(WaitingHandler waitingHandler)
waitingHandler
- the waiting handlerpublic void addFraction(String fraction)
fraction
- the fraction nameCopyright © 2021. All rights reserved.