Class PeptideProteinMapping
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.
- Author:
- Marc Vaudel
-
Field Summary
Fields Modifier and Type Field Description int
fmIndexPosition
The position in the FM index. -
Constructor Summary
Constructors Constructor Description PeptideProteinMapping()
Empty default constructor.PeptideProteinMapping(String proteinAccession, String peptideSequence, int index)
Constructor.PeptideProteinMapping(String proteinAccession, String peptideSequence, int index, ModificationMatch[] modificationMatches)
Constructor.PeptideProteinMapping(String proteinAccession, String peptideSequence, int index, ModificationMatch[] modificationMatches, PeptideVariantMatches peptideVariantMatches)
Constructor. -
Method Summary
Modifier and Type Method Description int
getIndex()
Returns the index on the protein.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.static HashMap<String,HashSet<String>>
getPeptideProteinMap(ArrayList<PeptideProteinMapping> peptideProteinMappings)
Returns a map made from the given mappings containing protein accessions for every peptide sequence.static Collection<Peptide>
getPeptides(ArrayList<PeptideProteinMapping> peptideProteinMappings, SequenceMatchingParameters sequenceMatchingPreferences)
Aggregates the given mapping into a list of peptides.String
getPeptideSequence()
Returns the peptide sequence.PeptideVariantMatches
getPeptideVariantMatches()
Returns eventual variants found.String
getProteinAccession()
Returns the accession of the protein.ModificationMatch[]
getVariableModifications()
Returns eventual modifications found.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.
-
Field Details
-
fmIndexPosition
public int fmIndexPositionThe 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 proteinpeptideSequence
- the peptide sequenceindex
- the index on the proteinmodificationMatches
- eventual modification matchespeptideVariantMatches
- eventual sequence variants
-
PeptideProteinMapping
Constructor.- Parameters:
proteinAccession
- the accession of the proteinpeptideSequence
- the peptide sequenceindex
- the index on the protein
-
PeptideProteinMapping
public PeptideProteinMapping(String proteinAccession, String peptideSequence, int index, ModificationMatch[] modificationMatches)Constructor.- Parameters:
proteinAccession
- the accession of the proteinpeptideSequence
- the peptide sequenceindex
- the index on the proteinmodificationMatches
- modification matches
-
-
Method Details
-
getProteinAccession
Returns the accession of the protein.- Returns:
- the accession of the protein
-
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
Returns eventual modifications found.- Returns:
- eventual modifications found
-
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 mappingssequenceMatchingPreferences
- the sequence matching preferences- Returns:
- a list of peptides
-