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

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

public class ProteinMatch
extends IdentificationMatch

This class models a protein 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
 
Field Summary
static java.lang.String PROTEIN_KEY_SPLITTER
          The splitter in the key between spectrumFile and spectrumTitle.
 
Constructor Summary
ProteinMatch()
          Constructor for the protein match.
ProteinMatch(Peptide peptide)
          Constructor for the protein match.
ProteinMatch(java.lang.String proteinAccession)
          Constructor for the protein match.
 
Method Summary
 void addPeptideMatch(java.lang.String peptideMatchKey)
          Add a subordinated peptide match.
 void addTheoreticProtein(java.lang.String proteinAccession)
          Setter for the matching protein.
 boolean contains(ProteinMatch proteinMatch)
          Returns a boolean indicating whether the protein match contains another set of theoretic proteins.
 boolean contains(java.lang.String aProtein)
          Returns a boolean indicating whether a protein was found in this protein match.
static boolean contains(java.lang.String sharedKey, java.lang.String uniqueKey)
          Returns a boolean indicating whether a protein match contains another set of matches.
static java.lang.String[] getAccessions(java.lang.String key)
          Returns a list of accessions from the given key.
 java.lang.String getKey()
          returns the key of a match.
 java.lang.String getMainMatch()
          Returns the main match accession after protein inference.
 int getNProteins()
          Returns the number of proteins for this match.
static int getNProteins(java.lang.String matchKey)
          Returns the number of proteins for the match corresponding to the given.
 int getPeptideCount()
          Returns the number of peptides found.
 java.util.ArrayList<java.lang.String> getPeptideMatches()
          Getter for the peptide matches.
static java.lang.String getProteinMatchKey(Peptide peptide)
          Convenience method which returns the protein key of a peptide.
 java.util.ArrayList<java.lang.String> getTheoreticProteinsAccessions()
          Returns the accessions of the possible theoretic proteins.
 IdentificationMatch.MatchType getType()
          Returns the type of match.
 boolean isDecoy()
          Method indicates if the protein match is a decoy one.
static boolean isDecoy(java.lang.String key)
          Convenience method indicating whether a match is decoy based on the match key.
 void setMainMatch(java.lang.String mainMatch)
          Sets the main protein accession after protein inference.
 
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
 

Field Detail

PROTEIN_KEY_SPLITTER

public static final java.lang.String PROTEIN_KEY_SPLITTER
The splitter in the key between spectrumFile and spectrumTitle.

See Also:
Constant Field Values
Constructor Detail

ProteinMatch

public ProteinMatch()
Constructor for the protein match.


ProteinMatch

public ProteinMatch(java.lang.String proteinAccession)
             throws java.lang.IllegalArgumentException
Constructor for the protein match.

Parameters:
proteinAccession - the matching protein
Throws:
java.lang.IllegalArgumentException

ProteinMatch

public ProteinMatch(Peptide peptide)
Constructor for the protein match.

Parameters:
peptide - The corresponding peptide match
Method Detail

getTheoreticProteinsAccessions

public java.util.ArrayList<java.lang.String> getTheoreticProteinsAccessions()
Returns the accessions of the possible theoretic proteins.

Returns:
the accessions of the possible theoretic proteins

addTheoreticProtein

public void addTheoreticProtein(java.lang.String proteinAccession)
Setter for the matching protein.

Parameters:
proteinAccession - the matching protein

getMainMatch

public java.lang.String getMainMatch()
Returns the main match accession after protein inference.

Returns:
the main match accession after protein inference

setMainMatch

public void setMainMatch(java.lang.String mainMatch)
Sets the main protein accession after protein inference.

Parameters:
mainMatch - the main match

getPeptideMatches

public java.util.ArrayList<java.lang.String> getPeptideMatches()
Getter for the peptide matches.

Returns:
subordinated peptide matches

addPeptideMatch

public void addPeptideMatch(java.lang.String peptideMatchKey)
Add a subordinated peptide match.

Parameters:
peptideMatchKey - a peptide match

getPeptideCount

public int getPeptideCount()
Returns the number of peptides found.

Returns:
the number of peptides found

isDecoy

public boolean isDecoy()
Method indicates if the protein match is a decoy one.

Returns:
boolean indicating if the protein match is a decoy one

isDecoy

public static boolean isDecoy(java.lang.String key)
Convenience method indicating whether a match is decoy based on the match key.

Parameters:
key - the match key
Returns:
a boolean indicating whether a match is decoy

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

getProteinMatchKey

public static java.lang.String getProteinMatchKey(Peptide peptide)
Convenience method which returns the protein key of a peptide.

Parameters:
peptide - the considered peptide
Returns:
the protein match key

getNProteins

public static int getNProteins(java.lang.String matchKey)
Returns the number of proteins for the match corresponding to the given. key.

Parameters:
matchKey - the given key
Returns:
the number of proteins for this match

getNProteins

public int getNProteins()
Returns the number of proteins for this match.

Returns:
the number of proteins for this match

contains

public static boolean contains(java.lang.String sharedKey,
                               java.lang.String uniqueKey)
Returns a boolean indicating whether a protein match contains another set of matches.

Parameters:
sharedKey - the key of the protein of interest
uniqueKey - the key of the protein supposedly contained
Returns:
a boolean indicating whether a protein match contains another set of matches.

contains

public boolean contains(ProteinMatch proteinMatch)
Returns a boolean indicating whether the protein match contains another set of theoretic proteins.

Parameters:
proteinMatch - another protein match
Returns:
a boolean indicating whether the protein match contains another set of theoretic proteins

contains

public boolean contains(java.lang.String aProtein)
Returns a boolean indicating whether a protein was found in this protein match.

Parameters:
aProtein - the inspected protein
Returns:
a boolean indicating whether a protein was found in this protein match

getAccessions

public static java.lang.String[] getAccessions(java.lang.String key)
Returns a list of accessions from the given key.

Parameters:
key - the given key
Returns:
the corresponding list of accessions

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


Copyright © 2013. All Rights Reserved.