All Implemented Interfaces:
Serializable

public class ProteinMatch
extends IdentificationMatch
This class models a protein match.
Author:
Marc Vaudel, Dominik Kopczynski
See Also:
Serialized Form
  • Constructor Details

    • ProteinMatch

      public ProteinMatch()
      Constructor for the protein match.
    • ProteinMatch

      public ProteinMatch​(String proteinAccession)
      Constructor for the protein match.
      Parameters:
      proteinAccession - the matching protein
    • ProteinMatch

      public ProteinMatch​(Peptide peptide, long peptideMatchKey)
      Constructor for the protein match. Note: proteins must be set for the peptide.
      Parameters:
      peptide - the corresponding peptide match
      peptideMatchKey - the key of the peptide match
  • Method Details

    • setAccessions

      public void setAccessions​(String[] newAccessions)
      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

      public String[] getAccessions()
      Returns the accessions of the proteins in this match.
      Returns:
      the accessions of the proteins in this match
    • getLeadingAccession

      public String getLeadingAccession()
      Returns the leading accession for this match.
      Returns:
      the leading accession for this match
    • setLeadingAccession

      public void setLeadingAccession​(String leadingAccession)
      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 class IdentificationMatch
      Returns:
      the key of a match
    • getProteinMatchKey

      public static long getProteinMatchKey​(Peptide peptide)
      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

      public boolean contains​(String aProtein)
      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 class IdentificationMatch
      Returns:
      the type of match