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
This class models a protein match.
- Author:
- Marc Vaudel, Dominik Kopczynski
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.compomics.util.experiment.identification.IdentificationMatch
IdentificationMatch.MatchType -
Field Summary
Fields inherited from class com.compomics.util.experiment.personalization.ExperimentObject
NO_KEY -
Constructor Summary
ConstructorsConstructorDescriptionConstructor 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 TypeMethodDescriptionvoidaddPeptideMatchKey(long peptideMatchKey) Add a subordinated peptide key.voidaddPeptideMatchKeys(long[] newKeys) Add a subordinated peptide key.booleanReturns a boolean indicating whether a protein was found in this protein match.booleancontainsPeptide(long peptideKey) Returns a boolean indicating whether a peptide was found in this protein match.String[]Returns the accessions of the proteins in this match.longgetKey()Returns the key of a match.Returns the leading accession for this match.intReturns the number of proteins for this match.intReturns the number of peptides found.long[]Getter for the peptide keys.static longgetProteinMatchKey(Peptide peptide) Convenience method which returns the protein key from a peptide.getType()Returns the type of match.Returns the variable modifications.booleanisDecoy()Returns a boolean indicating whether the given match is decoy.voidsetAccessions(String[] newAccessions) Sets the accessions of the proteins in this group.voidsetDecoy(boolean decoy) Sets whether the given match is decoyvoidsetLeadingAccession(String leadingAccession) Sets the leading accession for this match.voidsetPeptideMatchesKeys(long[] peptideMatchKeys) Sets the peptide keys for this protein match.voidsetVariableModifications(ModificationMatch[] variableModifications) Sets the variable modifications.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:IdentificationMatchReturns the key of a match.- Specified by:
getKeyin 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
-
getVariableModifications
Returns the variable modifications.- Returns:
- the variable modifications
-
setVariableModifications
Sets the variable modifications.- Parameters:
variableModifications- the variable modifications.
-
getType
Description copied from class:IdentificationMatchReturns the type of match.- Specified by:
getTypein classIdentificationMatch- Returns:
- the type of match
-