public class ProteinMatchesIterator extends Object
Modifier and Type | Field and Description |
---|---|
int |
defaultBatchSize
The default batch size.
|
double |
defaultMargin
The default margin to use to start batch loading before the loading index
is reached.
|
Constructor and Description |
---|
ProteinMatchesIterator(ArrayList<String> proteinKeys,
Identification identification,
ArrayList<UrParameter> proteinParameters,
boolean loadPeptides,
ArrayList<UrParameter> peptideParameters,
boolean loadPsms,
ArrayList<UrParameter> psmParameters,
WaitingHandler waitingHandler)
Constructor.
|
ProteinMatchesIterator(Identification identification,
ArrayList<UrParameter> proteinParameters,
boolean loadPeptides,
ArrayList<UrParameter> peptideParameters,
boolean loadPsms,
ArrayList<UrParameter> psmParameters,
WaitingHandler waitingHandler)
Constructor for an iterator iterating all protein keys.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Indicates whether the iterator is done iterating.
|
ProteinMatch |
next()
Returns the next match and updates the buffer.
|
void |
setBatchSize(int batchSize)
Set the batch size.
|
public final int defaultBatchSize
public final double defaultMargin
public ProteinMatchesIterator(ArrayList<String> proteinKeys, Identification identification, ArrayList<UrParameter> proteinParameters, boolean loadPeptides, ArrayList<UrParameter> peptideParameters, boolean loadPsms, ArrayList<UrParameter> psmParameters, WaitingHandler waitingHandler)
proteinKeys
- the keys of the proteins to iterateidentification
- the identification where to get the matches fromproteinParameters
- the protein parameters to load along with the
matchesloadPeptides
- if true the peptides corresponding to these proteins
will be batch loaded along with the proteinspeptideParameters
- the parameters to load along with the peptide
matchesloadPsms
- if true the PSMs of the peptides will be batch loaded
along with the matchespsmParameters
- the parameters to load along with the matcheswaitingHandler
- the waiting handlerpublic ProteinMatchesIterator(Identification identification, ArrayList<UrParameter> proteinParameters, boolean loadPeptides, ArrayList<UrParameter> peptideParameters, boolean loadPsms, ArrayList<UrParameter> psmParameters, WaitingHandler waitingHandler)
identification
- the identification where to get the matches fromproteinParameters
- the protein parameters to load along with the
matchesloadPeptides
- if true the peptides corresponding to these proteins
will be batch loaded along with the proteinspeptideParameters
- the parameters to load along with the peptide
matchesloadPsms
- if true the PSMs of the peptides will be batch loaded
along with the matchespsmParameters
- the parameters to load along with the matcheswaitingHandler
- the waiting handlerpublic boolean hasNext()
public ProteinMatch next() throws SQLException, IOException, ClassNotFoundException, InterruptedException
SQLException
- exception thrown whenever an error occurred while
interacting with the matches databaseIOException
- exception thrown whenever an error occurred while
interacting with the matches databaseClassNotFoundException
- exception thrown whenever an error
occurred while deserializing a match from the databaseInterruptedException
- exception thrown whenever a threading issue
occurred while retrieving the matchpublic void setBatchSize(int batchSize)
batchSize
- the batch sizeCopyright © 2016. All rights reserved.