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:
java.io.Serializable, java.lang.Cloneable

public class SpectrumMatch
extends IdentificationMatch

This class models a spectrum match.

Created by IntelliJ IDEA. User: Marc Date: Jun 18, 2010 Time: 8:58:26 AM

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(java.lang.String spectrumKey)
          Constructor for the spectrum match
SpectrumMatch(java.lang.String spectrumKey, PeptideAssumption assumption)
          Constructor for the spectrum match
 
Method Summary
 void addHit(int otherAdvocateId, PeptideAssumption otherAssumption)
          add a first hit
 java.util.ArrayList<java.lang.Integer> getAdvocates()
          Returns all advocates used referenced by their index
 java.util.ArrayList<PeptideAssumption> getAllAssumptions()
          Return all assumptions for all search engines as a list
 java.util.HashMap<java.lang.Double,java.util.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
 java.lang.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(java.lang.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(java.lang.String spectrumKey,
                     PeptideAssumption assumption)
Constructor for the spectrum match

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

SpectrumMatch

public SpectrumMatch(java.lang.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 java.lang.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 java.util.HashMap<java.lang.Double,java.util.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 java.util.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 java.util.ArrayList<java.lang.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(java.lang.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.