Class ProteinMatch
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.identification.IdentificationMatch
com.compomics.util.experiment.identification.matches.ProteinMatch
- All Implemented Interfaces:
Serializable
public class ProteinMatch extends IdentificationMatch
This class models a protein match.
- Author:
- Marc Vaudel, Dominik Kopczynski
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class com.compomics.util.experiment.identification.IdentificationMatch
IdentificationMatch.MatchType
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ProteinMatch()
Constructor for the protein match.ProteinMatch(Peptide peptide, long peptideMatchKey)
Constructor for the protein match.ProteinMatch(String proteinAccession)
Constructor for the protein match. -
Method Summary
Modifier and Type Method Description void
addPeptideMatchKey(long peptideMatchKey)
Add a subordinated peptide key.void
addPeptideMatchKeys(long[] newKeys)
Add a subordinated peptide key.boolean
contains(String aProtein)
Returns a boolean indicating whether a protein was found in this protein match.boolean
containsPeptide(long peptideKey)
Returns a boolean indicating whether a peptide was found in this protein match.String[]
getAccessions()
Returns the accessions of the proteins in this match.long
getKey()
Returns the key of a match.String
getLeadingAccession()
Returns the leading accession for this match.int
getNProteins()
Returns the number of proteins for this match.int
getPeptideCount()
Returns the number of peptides found.long[]
getPeptideMatchesKeys()
Getter for the peptide keys.static long
getProteinMatchKey(Peptide peptide)
Convenience method which returns the protein key from a peptide.IdentificationMatch.MatchType
getType()
Returns the type of match.boolean
isDecoy()
Returns a boolean indicating whether the given match is decoy.void
setAccessions(String[] newAccessions)
Sets the accessions of the proteins in this group.void
setDecoy(boolean decoy)
Sets whether the given match is decoyvoid
setLeadingAccession(String leadingAccession)
Sets the leading accession for this match.void
setPeptideMatchesKeys(long[] peptideMatchKeys)
Sets the peptide keys for this protein match.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Constructor Details
-
ProteinMatch
public ProteinMatch()Constructor for the protein match. -
ProteinMatch
Constructor for the protein match.- Parameters:
proteinAccession
- the matching protein
-
ProteinMatch
Constructor for the protein match. Note: proteins must be set for the peptide.- Parameters:
peptide
- the corresponding peptide matchpeptideMatchKey
- the key of the peptide match
-
-
Method Details
-
setAccessions
Sets the accessions of the proteins in this group. Note, accessions must be sorted.- Parameters:
newAccessions
- the accessions of the proteins in this group
-
getAccessions
Returns the accessions of the proteins in this match.- Returns:
- the accessions of the proteins in this match
-
getLeadingAccession
Returns the leading accession for this match.- Returns:
- the leading accession for this match
-
setLeadingAccession
Sets the leading accession for this match.- Parameters:
leadingAccession
- the leading accession for this match
-
isDecoy
public boolean isDecoy()Returns a boolean indicating whether the given match is decoy.- Returns:
- a boolean indicating whether the given match is decoy
-
setDecoy
public void setDecoy(boolean decoy)Sets whether the given match is decoy- Parameters:
decoy
- a boolean indicating whether the given match is decoy
-
getPeptideMatchesKeys
public long[] getPeptideMatchesKeys()Getter for the peptide keys.- Returns:
- subordinated peptide keys
-
addPeptideMatchKey
public void addPeptideMatchKey(long peptideMatchKey)Add a subordinated peptide key.- Parameters:
peptideMatchKey
- a peptide key
-
addPeptideMatchKeys
public void addPeptideMatchKeys(long[] newKeys)Add a subordinated peptide key.- Parameters:
newKeys
- peptide keys
-
setPeptideMatchesKeys
public void setPeptideMatchesKeys(long[] peptideMatchKeys)Sets the peptide keys for this protein match.- Parameters:
peptideMatchKeys
- the peptide match keys
-
getPeptideCount
public int getPeptideCount()Returns the number of peptides found.- Returns:
- the number of peptides found
-
getKey
public long getKey()Description copied from class:IdentificationMatch
Returns the key of a match.- Specified by:
getKey
in classIdentificationMatch
- Returns:
- the key of a match
-
getProteinMatchKey
Convenience method which returns the protein key from a peptide. Note: proteins must be set for the peptide.- Parameters:
peptide
- the considered peptide- Returns:
- the protein match key
-
getNProteins
public int getNProteins()Returns the number of proteins for this match.- Returns:
- the number of proteins for this match
-
contains
Returns a boolean indicating whether a protein was found in this protein match.- Parameters:
aProtein
- the protein accession- Returns:
- a boolean indicating whether a protein was found in this protein match
-
containsPeptide
public boolean containsPeptide(long peptideKey)Returns a boolean indicating whether a peptide was found in this protein match.- Parameters:
peptideKey
- the peptide key- Returns:
- a boolean indicating whether a peptide was found in this protein match
-
getType
Description copied from class:IdentificationMatch
Returns the type of match.- Specified by:
getType
in classIdentificationMatch
- Returns:
- the type of match
-