public class SpectrumMatch extends IdentificationMatch
IdentificationMatch.MatchType
Constructor and Description |
---|
SpectrumMatch()
Constructor for the spectrum match.
|
SpectrumMatch(String spectrumKey)
Constructor for the spectrum match.
|
SpectrumMatch(String spectrumKey,
SpectrumIdentificationAssumption assumption)
Constructor for the spectrum match.
|
Modifier and Type | Method and Description |
---|---|
void |
addHit(int otherAdvocateId,
SpectrumIdentificationAssumption otherAssumption,
boolean ascendingScore)
Add a first hit.
|
ArrayList<SpectrumIdentificationAssumption> |
getAllAssumptions()
Return all assumptions for all identification algorithms as a list.
|
HashMap<Double,ArrayList<SpectrumIdentificationAssumption>> |
getAllAssumptions(int advocateId)
Return all assumptions for the specified search engine indexed by their
e-value.
|
HashMap<Integer,HashMap<Double,ArrayList<SpectrumIdentificationAssumption>>> |
getAssumptionsMap()
Returns the assumptions map: advocate id → score → list of assumptions.
|
PeptideAssumption |
getBestPeptideAssumption()
Getter for the best peptide assumption.
|
TagAssumption |
getBestTagAssumption()
Getter for the best tag assumption.
|
String |
getKey()
Returns the key of a match.
|
SpectrumMatch |
getPeptidesFromTags(ProteinTree proteinTree,
TagMatcher tagMatcher,
SequenceMatchingPreferences sequenceMatchingPreferences,
Double massTolerance,
boolean scoreInAscendingOrder,
boolean ascendingScore)
Creates a peptide based spectrum match where peptide assumptions are
deduced from tag assumptions.
|
Integer |
getSpectrumNumber()
Returns the spectrum number in the spectrum file.
|
HashMap<Integer,HashMap<String,ArrayList<TagAssumption>>> |
getTagAssumptionsMap(int keySize,
SequenceMatchingPreferences sequenceMatchingPreferences)
Returns a map containing the tag assumptions of this spectrum assumptions
indexed by the beginning of the longest amino acid sequence.
|
IdentificationMatch.MatchType |
getType()
Returns the type of match.
|
boolean |
hasAssumption()
Indicates whether the spectrum match contains a peptide assumption from a
search engine.
|
boolean |
hasAssumption(int advocateId)
Indicates whether the spectrum match contains a peptide assumption for
the given advocate (for example a search engine, see the Advocate class)
|
void |
removeAssumption(SpectrumIdentificationAssumption assumption)
Removes an assumption from the mapping.
|
void |
removeAssumptions()
Removes all assumptions but the best ones from the spectrum map.
|
void |
removeTagAssumptionsMap()
Removes the tags assumptions Map to free memory.
|
void |
setBestPeptideAssumption(PeptideAssumption bestAssumption)
Setter for the best peptide assumption.
|
void |
setBestTagAssumption(TagAssumption bestTagAsssumption)
Setter for the best tag assumption.
|
void |
setKey(String newKey)
Replaces the new key.
|
void |
setSpectrumNumber(Integer spectrumNumber)
Sets the spectrum number in the spectrum file.
|
addUrParam, getParameterKey, getUrParam
public SpectrumMatch()
public SpectrumMatch(String spectrumKey, SpectrumIdentificationAssumption assumption)
spectrumKey
- The matched spectrumKeyassumption
- The matching assumptionpublic SpectrumMatch(String spectrumKey)
spectrumKey
- The matched spectrum keypublic PeptideAssumption getBestPeptideAssumption()
public void setBestPeptideAssumption(PeptideAssumption bestAssumption)
bestAssumption
- the best peptide assumption for the spectrumpublic TagAssumption getBestTagAssumption()
public void setBestTagAssumption(TagAssumption bestTagAsssumption)
bestTagAsssumption
- the best tag assumption for the spectrumpublic String getKey()
IdentificationMatch
getKey
in class IdentificationMatch
public HashMap<Double,ArrayList<SpectrumIdentificationAssumption>> getAllAssumptions(int advocateId)
advocateId
- the desired advocate IDpublic ArrayList<SpectrumIdentificationAssumption> getAllAssumptions()
public HashMap<Integer,HashMap<Double,ArrayList<SpectrumIdentificationAssumption>>> getAssumptionsMap()
public void removeAssumptions()
public void addHit(int otherAdvocateId, SpectrumIdentificationAssumption otherAssumption, boolean ascendingScore)
otherAdvocateId
- the index of the new advocateotherAssumption
- the new identification assumptionascendingScore
- indicates whether the score is ascending when hits
get betterpublic IdentificationMatch.MatchType getType()
IdentificationMatch
getType
in class IdentificationMatch
public void setKey(String newKey)
newKey
- the new keypublic Integer getSpectrumNumber()
public void setSpectrumNumber(Integer spectrumNumber)
spectrumNumber
- the spectrum number in the spectrum filepublic void removeAssumption(SpectrumIdentificationAssumption assumption)
assumption
- the peptide assumption to removepublic boolean hasAssumption()
public boolean hasAssumption(int advocateId)
advocateId
- The index of the advocatepublic SpectrumMatch getPeptidesFromTags(ProteinTree proteinTree, TagMatcher tagMatcher, SequenceMatchingPreferences sequenceMatchingPreferences, Double massTolerance, boolean scoreInAscendingOrder, boolean ascendingScore) throws IOException, InterruptedException, ClassNotFoundException, SQLException
proteinTree
- the protein tree to use to map tags to peptidessequenceMatchingPreferences
- the sequence matching preferencesmassTolerance
- the MS2 mass tolerance to usescoreInAscendingOrder
- boolean indicating whether the tag score is
in the ascending order; ie the higher the score, the better the match.tagMatcher
- the tag matcher to useascendingScore
- indicates whether the score is ascending when hits
get betterIOException
- if an IOException occursSQLException
- if an SQLException occursClassNotFoundException
- if a ClassNotFoundException occursInterruptedException
- if an InterruptedException occurspublic HashMap<Integer,HashMap<String,ArrayList<TagAssumption>>> getTagAssumptionsMap(int keySize, SequenceMatchingPreferences sequenceMatchingPreferences)
keySize
- the size to use for the keyssequenceMatchingPreferences
- the sequence matching preferencespublic void removeTagAssumptionsMap()
Copyright © 2016. All rights reserved.