java.lang.Object
com.compomics.util.experiment.identification.protein_inference.PeptideProteinMapping

public class PeptideProteinMapping extends Object
Class used to model the mapping of a peptide to a protein sequence. Note that all peptide indexes are zero-based.
Author:
Marc Vaudel
  • Field Details

    • fmIndexPosition

      public int fmIndexPosition
      The position in the FM index.
  • Constructor Details

    • PeptideProteinMapping

      public PeptideProteinMapping()
      Empty default constructor.
    • PeptideProteinMapping

      public PeptideProteinMapping(String proteinAccession, String peptideSequence, int index, ModificationMatch[] modificationMatches, PeptideVariantMatches peptideVariantMatches)
      Constructor.
      Parameters:
      proteinAccession - the accession of the protein
      peptideSequence - the peptide sequence
      index - the index on the protein
      modificationMatches - eventual modification matches
      peptideVariantMatches - eventual sequence variants
    • PeptideProteinMapping

      public PeptideProteinMapping(String proteinAccession, String peptideSequence, int index)
      Constructor.
      Parameters:
      proteinAccession - the accession of the protein
      peptideSequence - the peptide sequence
      index - the index on the protein
    • PeptideProteinMapping

      public PeptideProteinMapping(String proteinAccession, String peptideSequence, int index, ModificationMatch[] modificationMatches)
      Constructor.
      Parameters:
      proteinAccession - the accession of the protein
      peptideSequence - the peptide sequence
      index - the index on the protein
      modificationMatches - modification matches
  • Method Details

    • getProteinAccession

      public String getProteinAccession()
      Returns the accession of the protein.
      Returns:
      the accession of the protein
    • getPeptideSequence

      public String getPeptideSequence()
      Returns the peptide sequence.
      Returns:
      the peptide sequence
    • getIndex

      public int getIndex()
      Returns the index on the protein.
      Returns:
      the index on the protein
    • getVariableModifications

      public ModificationMatch[] getVariableModifications()
      Returns eventual modifications found.
      Returns:
      eventual modifications found
    • getPeptideVariantMatches

      public PeptideVariantMatches getPeptideVariantMatches()
      Returns eventual variants found.
      Returns:
      eventual variants found
    • getPeptideProteinIndexesMap

      public static HashMap<String,HashMap<String,int[]>> getPeptideProteinIndexesMap(ArrayList<PeptideProteinMapping> peptideProteinMappings)
      Returns a map made from the given mappings containing the indexes of the peptides in the protein sequences indexed by peptide sequence and protein accession.
      Parameters:
      peptideProteinMappings - a list of peptide to protein mappings
      Returns:
      a map of the mapping
    • getPeptideProteinMap

      public static HashMap<String,HashSet<String>> getPeptideProteinMap(ArrayList<PeptideProteinMapping> peptideProteinMappings)
      Returns a map made from the given mappings containing protein accessions for every peptide sequence.
      Parameters:
      peptideProteinMappings - a list of peptide to protein mappings
      Returns:
      a map of the mapping
    • getVariantMatches

      public static HashMap<String,HashMap<Integer,PeptideVariantMatches>> getVariantMatches(ArrayList<PeptideProteinMapping> peptideProteinMappings)
      Returns the variant matches summarized in a map indexed by protein accession and peptide index on the protein sequence. Null if no variant found.
      Parameters:
      peptideProteinMappings - the protein mappings to group
      Returns:
      the variant matches summarized in a map
    • getPeptides

      public static Collection<Peptide> getPeptides(ArrayList<PeptideProteinMapping> peptideProteinMappings, SequenceMatchingParameters sequenceMatchingPreferences)
      Aggregates the given mapping into a list of peptides.
      Parameters:
      peptideProteinMappings - a list of peptides to protein mappings
      sequenceMatchingPreferences - the sequence matching preferences
      Returns:
      a list of peptides