com.compomics.util.experiment.identification.matches
Class SpectrumMatch

java.lang.Object
  extended by com.compomics.util.experiment.personalization.ExperimentObject
      extended by com.compomics.util.experiment.identification.IdentificationMatch
          extended by com.compomics.util.experiment.identification.matches.SpectrumMatch
All Implemented Interfaces:
Serializable, Cloneable

public class SpectrumMatch
extends IdentificationMatch

This class models a spectrum match.

Author:
Marc Vaudel
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.compomics.util.experiment.identification.IdentificationMatch
IdentificationMatch.MatchType
 
Constructor Summary
SpectrumMatch()
          Constructor for the spectrum match.
SpectrumMatch(String spectrumKey)
          Constructor for the spectrum match.
SpectrumMatch(String spectrumKey, PeptideAssumption assumption)
          Constructor for the spectrum match.
 
Method Summary
 void addHit(int otherAdvocateId, PeptideAssumption otherAssumption)
          Add a first hit.
 ArrayList<Integer> getAdvocates()
          Returns all advocates used referenced by their index.
 ArrayList<PeptideAssumption> getAllAssumptions()
          Return all assumptions for all search engines as a list.
 HashMap<Double,ArrayList<PeptideAssumption>> getAllAssumptions(int advocateId)
          Return all assumptions for the specified search engine indexed by their e-value.
 PeptideAssumption getBestAssumption()
          Getter for the best assumption.
 PeptideAssumption getFirstHit(int advocateId)
          Returns the first hit obtained using the specified advocate.
 String getKey()
          returns the key of a match.
 IdentificationMatch.MatchType getType()
          Returns the type of match.
 void setBestAssumption(PeptideAssumption bestAssumption)
          Setter for the best assumption.
 void setFirstHit(int advocateId, PeptideAssumption peptideAssumption)
          Sets the best peptideAssumption according to the search engine.
 void setKey(String newKey)
          Replaces the new key.
 
Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, getParameterKey, getUrParam
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpectrumMatch

public SpectrumMatch()
Constructor for the spectrum match.


SpectrumMatch

public SpectrumMatch(String spectrumKey,
                     PeptideAssumption assumption)
Constructor for the spectrum match.

Parameters:
spectrumKey - The matched spectrumKey
assumption - The matching peptide assumption

SpectrumMatch

public SpectrumMatch(String spectrumKey)
Constructor for the spectrum match.

Parameters:
spectrumKey - The matched spectrum key
Method Detail

getBestAssumption

public PeptideAssumption getBestAssumption()
Getter for the best assumption.

Returns:
the best assumption for the spectrum

setBestAssumption

public void setBestAssumption(PeptideAssumption bestAssumption)
Setter for the best assumption.

Parameters:
bestAssumption - the best assumption for the spectrum

getKey

public String getKey()
Description copied from class: IdentificationMatch
returns the key of a match.

Specified by:
getKey in class IdentificationMatch
Returns:
the key of a match

getAllAssumptions

public HashMap<Double,ArrayList<PeptideAssumption>> getAllAssumptions(int advocateId)
Return all assumptions for the specified search engine indexed by their e-value.

Parameters:
advocateId - the desired advocate ID
Returns:
all assumptions

getAllAssumptions

public ArrayList<PeptideAssumption> getAllAssumptions()
Return all assumptions for all search engines as a list.

Returns:
all assumptions

addHit

public void addHit(int otherAdvocateId,
                   PeptideAssumption otherAssumption)
Add a first hit.

Parameters:
otherAdvocateId - The index of the new advocate
otherAssumption - The new peptide assumption

getFirstHit

public PeptideAssumption getFirstHit(int advocateId)
Returns the first hit obtained using the specified advocate.

Parameters:
advocateId - the specified advocate index
Returns:
the first hit

setFirstHit

public void setFirstHit(int advocateId,
                        PeptideAssumption peptideAssumption)
Sets the best peptideAssumption according to the search engine.

Parameters:
advocateId - the search engine index
peptideAssumption - the best assumption

getAdvocates

public ArrayList<Integer> getAdvocates()
Returns all advocates used referenced by their index.

Returns:
all advocates used

getType

public IdentificationMatch.MatchType getType()
Description copied from class: IdentificationMatch
Returns the type of match.

Specified by:
getType in class IdentificationMatch
Returns:
the type of match

setKey

public void setKey(String newKey)
Replaces the new key. The key of the PSM should always be the same as the spectrum key it links to.

Parameters:
newKey - the new key


Copyright © 2012. All Rights Reserved.