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:
Serializable, Cloneable

public class ProteinMatch
extends IdentificationMatch

This class models a protein match.

Author:
Marc Vaudel
See Also:
Serialized Form

Nested Class Summary
static class ProteinMatch.MatchingType
          The different types of peptide to protein amino acid matching.
 
Nested classes/interfaces inherited from class com.compomics.util.experiment.identification.IdentificationMatch
IdentificationMatch.MatchType
 
Field Summary
static 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(String proteinAccession)
          Constructor for the protein match.
 
Method Summary
 void addPeptideMatch(String peptideMatchKey)
          Add a subordinated peptide key.
 void addTheoreticProtein(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(String aProtein)
          Returns a boolean indicating whether a protein was found in this protein match.
static boolean contains(String sharedKey, String uniqueKey)
          Returns a boolean indicating whether a protein match contains another set of matches.
static String[] getAccessions(String key)
          Returns a list of accessions from the given key.
static ArrayList<String> getCommonProteins(String group1, String group2)
          Returns the common proteins between two protein groups.
 String getKey()
          returns the key of a match.
 String getMainMatch()
          Returns the main match accession after protein inference.
 int getNProteins()
          Returns the number of proteins for this match.
static int getNProteins(String matchKey)
          Returns the number of proteins for the match corresponding to the given.
static ArrayList<String> getOtherProteins(String group1, String group2)
          Returns the proteins in a group (group1) which are not in another group (group2).
 int getPeptideCount()
          Returns the number of peptides found.
 ArrayList<String> getPeptideMatches()
          Getter for the peptide keys.
static String getProteinMatchKey(Peptide peptide)
          Convenience method which returns the protein key of a peptide.
 ArrayList<String> getTheoreticProteinsAccessions()
          Returns the accessions of the possible theoretic proteins.
 IdentificationMatch.MatchType getType()
          Returns the type of match.
 boolean hasEnzymaticPeptide(String accession, Enzyme enzyme, ProteinMatch.MatchingType matchingType, Double massTolerance)
          Indicates whether the protein group has an enzymatic peptide when considering the given accession as main accession.
 boolean isDecoy()
          Method indicates if the protein match is a decoy one.
static boolean isDecoy(String key)
          Convenience method indicating whether a match is decoy based on the match key.
 void setMainMatch(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 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(String proteinAccession)
             throws IllegalArgumentException
Constructor for the protein match.

Parameters:
proteinAccession - the matching protein
Throws:
IllegalArgumentException

ProteinMatch

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

Parameters:
peptide - the corresponding peptide match
Method Detail

getTheoreticProteinsAccessions

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

Returns:
the accessions of the possible theoretic proteins

addTheoreticProtein

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

Parameters:
proteinAccession - the matching protein

getMainMatch

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

Returns:
the main match accession after protein inference

setMainMatch

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

Parameters:
mainMatch - the main match

getPeptideMatches

public ArrayList<String> getPeptideMatches()
Getter for the peptide keys.

Returns:
subordinated peptide keys

addPeptideMatch

public void addPeptideMatch(String peptideMatchKey)
Add a subordinated peptide key.

Parameters:
peptideMatchKey - a peptide key

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(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 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 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(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(String sharedKey,
                               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.

getOtherProteins

public static ArrayList<String> getOtherProteins(String group1,
                                                 String group2)
Returns the proteins in a group (group1) which are not in another group (group2).

Parameters:
group1 - the key of the shared group
group2 - the key of the unique group
Returns:
list of the accessions in the search group which are not in the unique group

getCommonProteins

public static ArrayList<String> getCommonProteins(String group1,
                                                  String group2)
Returns the common proteins between two protein groups.

Parameters:
group1 - key of the first group
group2 - key of the second group
Returns:
a list of common keys

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(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 String[] getAccessions(String key)
Returns a list of accessions from the given key.

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

hasEnzymaticPeptide

public boolean hasEnzymaticPeptide(String accession,
                                   Enzyme enzyme,
                                   ProteinMatch.MatchingType matchingType,
                                   Double massTolerance)
                            throws IOException,
                                   IllegalArgumentException,
                                   InterruptedException,
                                   FileNotFoundException,
                                   ClassNotFoundException
Indicates whether the protein group has an enzymatic peptide when considering the given accession as main accession.

Parameters:
accession - the candidate main accession
enzyme - the enzyme used
matchingType - the matching type
massTolerance - the mass tolerance for matching type 'indistiguishibleAminoAcids'. Can be null otherwise
Returns:
true if the main accession generates an enzymatic peptide
Throws:
IOException
IllegalArgumentException
InterruptedException
FileNotFoundException
ClassNotFoundException

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.