Class SpectrumMatch
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.identification.IdentificationMatch
com.compomics.util.experiment.identification.matches.SpectrumMatch
- All Implemented Interfaces:
Serializable
This class models a spectrum match.
- Author:
- Marc Vaudel, Dominik Kopczynski, Harald Barsnes
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.compomics.util.experiment.identification.IdentificationMatch
IdentificationMatch.MatchType -
Field Summary
Fields inherited from class com.compomics.util.experiment.personalization.ExperimentObject
NO_KEY -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for the spectrum match.SpectrumMatch(String spectrumFile, String spectrumTitle) Constructor for the spectrum match. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPeptideAssumption(int advocateId, PeptideAssumption peptideAssumption) Add a hit.voidaddTagAssumption(int advocateId, TagAssumption tagAssumption) Add a hit.Returns the advocates supporting hits for this spectrum.java.util.stream.Stream<PeptideAssumption> Returns a stream of all peptide assumptionsgetAllPeptideAssumptions(int advocateId) Returns all peptide assumptions for the specified search engine indexed by their score.java.util.stream.Stream<TagAssumption> Returns a stream of all tag assumptionsgetAllTagAssumptions(int advocateId) Returns all tag assumptions for the specified search engine indexed by their score.Getter for the best peptide assumption.Getter for the best tag assumption.longgetKey()Returns the key of a match.static longReturns a key to use for the spectrum match based on the file where the spectrum was found and its title.Returns the peptide assumptions map: advocate id > score > list of assumptions.Returns the name of the file where this spectrum was found.Returns the title of the spectrum.Returns the tag assumptions map: advocate id > score > list of assumptions.getType()Returns the type of match.booleanIndicates whether the spectrum match contains a peptide assumption.booleanhasPeptideAssumption(int advocateId) Indicates whether the spectrum match contains a peptide assumption for the given advocate (see the Advocate class).booleanIndicates whether the spectrum match contains a tag assumption.booleanhasTagAssumption(int advocateId) Indicates whether the spectrum match contains a tag assumption for the given advocate (see the Advocate class).voidremovePeptideAssumption(PeptideAssumption peptideAssumption) Removes an assumption from the mapping.voidremoveTagAssumption(TagAssumption tagAssumption) Removes an assumption from the mapping.voidsetBestPeptideAssumption(PeptideAssumption bestPeptideAssumption) Setter for the best peptide assumption.voidsetBestTagAssumption(TagAssumption bestTagAssumption) Setter for the best tag assumption.voidsetPeptideAssumptionMap(HashMap<Integer, TreeMap<Double, ArrayList<PeptideAssumption>>> peptideAssumptionsMap) Sets the peptide assumption map.voidsetSpectrumFile(String spectrumFile) Sets the spectrum file name.voidsetSpectrumTitle(String spectrumTitle) Sets the spectrum title.voidsetTagAssumptionMap(HashMap<Integer, TreeMap<Double, ArrayList<TagAssumption>>> tagAssumptionsMap) Sets the tag assumption map.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Constructor Details
-
SpectrumMatch
public SpectrumMatch()Constructor for the spectrum match. -
SpectrumMatch
Constructor for the spectrum match.- Parameters:
spectrumFile- The name of the file containing the spectrum.spectrumTitle- The title of the spectrum.
-
-
Method Details
-
setPeptideAssumptionMap
public void setPeptideAssumptionMap(HashMap<Integer, TreeMap<Double, ArrayList<PeptideAssumption>>> peptideAssumptionsMap) Sets the peptide assumption map.- Parameters:
peptideAssumptionsMap- the peptide assumption map
-
setTagAssumptionMap
public void setTagAssumptionMap(HashMap<Integer, TreeMap<Double, ArrayList<TagAssumption>>> tagAssumptionsMap) Sets the tag assumption map.- Parameters:
tagAssumptionsMap- the tag assumption map
-
getKey
Returns a key to use for the spectrum match based on the file where the spectrum was found and its title.- Parameters:
spectrumFile- The name of the file containing the spectrum.spectrumTitle- The title of the spectrum.- Returns:
- The key as long.
-
getBestPeptideAssumption
Getter for the best peptide assumption.- Returns:
- the best peptide assumption for the spectrum
-
setBestPeptideAssumption
Setter for the best peptide assumption.- Parameters:
bestPeptideAssumption- the best peptide assumption for the spectrum
-
getBestTagAssumption
Getter for the best tag assumption.- Returns:
- the best tag assumption for the spectrum
-
setBestTagAssumption
Setter for the best tag assumption.- Parameters:
bestTagAssumption- the best tag assumption for the spectrum
-
getSpectrumFile
Returns the name of the file where this spectrum was found.- Returns:
- The name of the file where this spectrum was found.
-
setSpectrumFile
Sets the spectrum file name.- Parameters:
spectrumFile- The spectrum file name.
-
getSpectrumTitle
Returns the title of the spectrum.- Returns:
- The title of the spectrum.
-
setSpectrumTitle
Sets the spectrum title.- Parameters:
spectrumTitle- The spectrum title.
-
getKey
public long getKey()Description copied from class:IdentificationMatchReturns the key of a match.- Specified by:
getKeyin classIdentificationMatch- Returns:
- the key of a match
-
getAdvocates
Returns the advocates supporting hits for this spectrum.- Returns:
- The advocates supporting hits for this spectrum.
-
getAllPeptideAssumptions
Returns all peptide assumptions for the specified search engine indexed by their score. Null if none found.- Parameters:
advocateId- the desired advocate ID- Returns:
- all assumptions
-
getAllTagAssumptions
Returns all tag assumptions for the specified search engine indexed by their score. Null if none found.- Parameters:
advocateId- the desired advocate ID- Returns:
- all assumptions
-
getAllPeptideAssumptions
Returns a stream of all peptide assumptions- Returns:
- a stream of all peptide assumptions
-
getAllTagAssumptions
Returns a stream of all tag assumptions- Returns:
- a stream of all tag assumptions
-
getPeptideAssumptionsMap
Returns the peptide assumptions map: advocate id > score > list of assumptions.- Returns:
- the assumptions map
-
getTagAssumptionsMap
Returns the tag assumptions map: advocate id > score > list of assumptions.- Returns:
- the assumptions map
-
addPeptideAssumption
Add a hit.- Parameters:
advocateId- the index of the advocate of the new hitpeptideAssumption- the new identification assumption
-
addTagAssumption
Add a hit.- Parameters:
advocateId- the index of the advocate of the new hittagAssumption- the new identification assumption
-
getType
Description copied from class:IdentificationMatchReturns the type of match.- Specified by:
getTypein classIdentificationMatch- Returns:
- the type of match
-
removePeptideAssumption
Removes an assumption from the mapping.- Parameters:
peptideAssumption- the peptide assumption to remove
-
removeTagAssumption
Removes an assumption from the mapping.- Parameters:
tagAssumption- the tag assumption to remove
-
hasPeptideAssumption
public boolean hasPeptideAssumption()Indicates whether the spectrum match contains a peptide assumption.- Returns:
- a boolean indicating whether the spectrum match contains a peptide assumption
-
hasTagAssumption
public boolean hasTagAssumption()Indicates whether the spectrum match contains a tag assumption.- Returns:
- a boolean indicating whether the spectrum match contains a tag assumption
-
hasPeptideAssumption
public boolean hasPeptideAssumption(int advocateId) Indicates whether the spectrum match contains a peptide assumption for the given advocate (see the Advocate class).- Parameters:
advocateId- The index of the advocate- Returns:
- a boolean indicating whether the spectrum match contains an assumption for the given advocate
-
hasTagAssumption
public boolean hasTagAssumption(int advocateId) Indicates whether the spectrum match contains a tag assumption for the given advocate (see the Advocate class).- Parameters:
advocateId- The index of the advocate- Returns:
- a boolean indicating whether the spectrum match contains an assumption for the given advocate
-